News for hackers. Stuff that matters.
Re:Clojure's Transducers are as fundamental as function comp... by rebcabin on Sunday August 31, 2014 @11:28AM (#8249507)
In addition to map transducers (which are 1-to-1) and filter transducers (which are many-to-1), flatMap transducers (which are 1-to-many) should be fundamental.
Re:Clojure's Transducers are as fundamental as function comp... by tel on Sunday August 31, 2014 @12:56PM (#8249743)
flatMap is the fundamental transducer (of a particular model). To be clear, the function a -> [b] subsumes mapping and filtering---if [b] is always a single element then a -> [b] is a map, if [b] is always either 0-or-1 elements then a -> [b] is a filter (possibly adjoined to a map).