[Tutor] lambdas, generators, and the like

Alan Gauld alan.gauld at btinternet.com
Sun Jan 12 10:19:30 CET 2014


On 12/01/14 09:04, Keith Winston wrote:

> I'm partially asking in order to clarify the question in my mind, but
> any help will be appreciated. I don't really understand lambda
> functions yet, but I can sort of imagine they might work here
> somehow... or not.

lambdas are just a shortcut for single expression functions.
You never need them, they just tidy up the code a bit by
avoiding lots of use-once short functions.

I'm not sure they would help a lot in your example. And,
given you don't understand them yet, they would add
complexity.

hth
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list