Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^8: RFC: Simulating Ruby's "yield" and "blocks" in Perl (Python)

by LanX (Sage)
on Apr 26, 2013 at 17:54 UTC ( #1030873=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     test(def _(x): print("You are in block %s" % x))
  2. or download this
    >>> def _(x):
    ...     print("You are in block %s" % x)
    ...
    back in test
    You are in block 2
    test lambda a: print("You are in block %s" % a)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1030873]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2023-02-08 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (42 votes). Check out past polls.

    Notices?