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

Re: Perl vs. Python: Looking at the Code

by ariels (Curate)
on Apr 04, 2002 at 12:00 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://156628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-18 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found