[Haskell-beginners] How to think like a functional programmer?

Henning Diedrich hd2010 at eonblast.com
Thu May 26 22:00:40 CEST 2011


On 5/26/11 7:55 PM, KC wrote:
>> On 26 May 2011 17:27, Costello, Roger L.<costello at mitre.org>  wrote:
>>> How did you “flip the switch” in your brain to the functional mindset?
> What I found important is the following:
> - to make your functions declaritive, then you can improve on them later
> - do what Geraint Jones has called "wholemeal programming"; it helps
> prevent a disease called "indexitis" and encourages lawful program
> construction (from "Pearls of Functional Algorithm Design", Richard
> Bird, 2010)

"Functional languages excel at wholemeal programming, a term
coined by Geraint Jones. Wholemeal programming means to think
big: work with an entire list, rather than a sequence of elements; develop
a solution space, rather than an individual solution; imagine
a graph, rather than a single path. The wholemeal approach often
offers new insights or provides new perspectives on a given problem.
It is nicely complemented by the idea of projective programming:
first solve a more general problem, then extract the interesting
bits and pieces by transforming the general program into more
specialised ones."

http://www.comlab.ox.ac.uk/ralf.hinze/publications/ICFP09.pdf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110526/892bac91/attachment.htm>


More information about the Beginners mailing list