[Haskell-cafe] capture of idioms and patterns

aditya siram aditya.siram at gmail.com
Sun Sep 26 14:48:19 EDT 2010


I haven't read this thread completely, but if someone else hasn't
beaten me to it, there are *lots* of Haskell idioms spelled out on the
Haskell Wiki [1] cleverly hidden under the category "Style".
-deech

[1] http://www.haskell.org/haskellwiki/Category:Style

On Fri, Sep 24, 2010 at 5:24 PM, Vo Minh Thu <noteed at gmail.com> wrote:
> 2010/9/24 Albert Y. C. Lai <trebla at vex.net>:
>> On 10-09-23 04:57 PM, Andrew Coppin wrote:
>>>
>>> If you think that sounds silly, ask some random person (not a computer
>>> programmer, just some random human) how find the sum of a list of
>>> numbers.
>>
>> My reply: to sum 10 numbers, sum 9 numbers, then account for the 10th. More
>> at:
>> http://groups.google.com/group/comp.lang.functional/msg/51df24fbf33b7059
>>
>> Ask some random person how to find page 314 in a book. No one replies "check
>> the 1st page, check the 2nd page, check the 3rd page...". In fact, no one
>> replies in words. Almost everyone shows you how to cut to the middle or the
>> estimated weighted middle (if the book seems to have 1000 pages, they cut
>> near the one-third point), then say "oh, before this" or "oh, after this",
>> repeat. Almost everyone divides and conquers. Almost everyone recurses.
>>
>> I am not a computer programmer.
>>
>> (I know that someone is bound to think, "when confronted with the problem of
>> summing numbers, some people think, 'I know, I will divide and conquer'. Now
>> they have two problems of summing numbers.")
>
> A computer scientist knows how to count the stars in the sky: simply
> count half of them then multiply by two. -- or something like that.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list