Talk:Cheryl's birthday: Difference between revisions

m
no edit summary
mNo edit summary
Line 22:
# List comprehensions are, mathematically, '''concat . map''' (or '''concatMap''') over functions returning list-wrapped values. This is functionally distinct from bare map and filter. Ironically '''all''' of these, are, in the underlying math of function composition, specialised variants of fold/reduce, which Guido didn't fully understand ('I need pencil and paper' etc) and which the community as a whole did, and therefore would not let him ban.
# Raising trivial operators to first class functions is absolutely correct, and indeed logically inevitable, when the former are passed as arguments to higher-order functions. That is '''precisely''' why Python has an '''operator''' library.
# 'Shares structure and naming with examples from other languages' Of course !!! Functional solutions inevitably (and very helpfully) resemble each other. They are structured by the same mathematical constraints, on function composition and immutable names. As for using standard Haskell/SML names for standard abstractions, that is already a well-established and explicitly documented best practice in Python. (See the itertools documentation page). In the context of a Rosetta project, this is particularly helpful. The shared names facilitate cross-reference, and the differing implementations of the same abstraction are instructive.
 
 
9,655

edits