[Haskell-cafe] Re: capture of idioms and patterns
Andrew Coppin
andrewcoppin at btinternet.com
Thu Sep 23 16:58:21 EDT 2010
On 22/09/2010 10:20 AM, Johannes Waldmann wrote:
>> - are there any prior art in documenting idioms and patterns in FP [...]
> you got this backwards: what some folks call "idioms and (design) patterns"
> actually *is* FP, because it is just this: higher order functions.
> And it's been there some decades (lambda calculus).
> That also explains the absence of any Design Patterns/Gang-of-Four
> kind of book for Haskell - it's just not needed.
> (as you say, map and fold are your patterns.)
Or rather, in Haskell your design patterns are things like "accumulating
parameters", "difference lists", "finally tagless", "combinator
libraries" and the like.
Sadly, in Haskell at least, most of these things are a kind of "oral
tradition" which isn't actually written down anywhere. (Which means that
basically the only way to learn Haskell is to hang around and ask lots
of dumb questions and gradually learn by osmosis...)
More information about the Haskell-Cafe
mailing list