in reply to Re^2: Designing a DWIMish interface for generator function
in thread Designing a DWIMish interface for generator function

PHP is a scripting language.

I have never seen the range function in perl , but I already saw it in PHP

I might be wrong though. but I still do not understand your question

  • Comment on Re^3: Designing a DWIMish interface for generator function

Replies are listed 'Best First'.
Re^4: Designing a DWIMish interface for generator function
by LanX (Saint) on Feb 01, 2010 at 03:38 UTC
    Many languages have range(), e.g. Python. Perl has a range operator ".." doing this in list context.

    My knowledge of PHP is quite reduced, so I can't possibly mix it in.

    Anyway range() was only meant as an example.

    I want to use the same function as iterator/generator in different contexts.

    Whats not clear about the 3 usage examples I gave?

    Cheers Rolf