Reply to post: Re: Rule 3: Functions should be curried.

Learn you Func Prog on five minute quick!

Anonymous Coward
Anonymous Coward

Re: Rule 3: Functions should be curried.

> [n + 4 for n in input]

Or:

map(lambda n: n+4, input)

That is, you can do partial application just by defining a new function, rather than explicit 'currying'

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019