Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How To: Make An Iterator

by ihb (Deacon)
on Apr 26, 2005 at 14:17 UTC ( #451582=note: print w/replies, xml ) Need Help??


in reply to How To: Make An Iterator

&infinite_evens is unnecessary complicated.

sub infinite_evens { my ($i) = @_; $i += $i % 2 - 2; return sub { $i += 2 }; }

ihb

See perltoc if you don't know which perldoc to read!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://451582]
help
Chatterbox?
[oiskuu]: Very, very smooth btw. Now the talk is about "Your mothers pussy", and freezer implies "hungry for meat"
[Your Mother]: :P
[ambrus]: YourMother: my brother told me their cat wants to climb into the dishwasher if they leave the door open. Not when the dishwasher is started, but after it's done washing, because it's still warm and cats like warm.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2017-12-18 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (490 votes). Check out past polls.

    Notices?