4 ms·
Intermediate Pythonista: The Function
- mhb 12y agoThese functions that take other functions as argument are commonly referred to as higher order functions and these form the basis for functional programming. Wikipedia, for one, disagrees about what functional programming is: http://en.wikipedia.org/wiki/Functional_programming http://en.wikipedia.org/wiki/Functional_programming
- c4obi 12y agoCheers for pointing out that.. Should have been 'are an important part of functional programming'
- deleted 12y ago[deleted]
- fpaboim 12y agoInteresting! I rather liked the part on closures, neat little hack, I feel the hacky nature makes them produce rather unreadable code (or at least real funky). Lua's closures are really nicely implemented, makes me actually prefer them to classes since in Lua it seems to be the other way around: classes are readable alright but you end up writing a lot of boilerplate code or having to use a library to do OOP.