Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Perl vs. Python: Looking at the Code

by ariels (Curate)
on Apr 04, 2002 at 12:00 UTC ( #156628=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    def adder(x):
      return lambda y: x+y
    
    a = adder(5)
    print a(3)
    
  2. or download this
    def adder(x):
      return lambda y,a=x: a+y
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2019-10-15 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?