[Haskell-cafe] Re: Bathroom reading
Aaron Denney
wnoise at ofb.net
Tue Aug 14 14:57:52 EDT 2007
On 2007-08-14, Spencer Janssen <sjanssen at cse.unl.edu> wrote:
> On Tuesday 14 August 2007 10:17:53 Dougal Stanton wrote:
>> I'm looking for cool but mind-bending examples of functional brilliance.
>>
>> Let us say, hypothetically, you had a bathroom without any reading
>> material. And having read all the Dilbert and Garfield you could
>> seriously stomach, decide you should educate yourself while "on the
>> job". :-)
>>
>> So you decide to print up some "one-liner" style programs into a
>> little booklet. Something between credit-card and postcard sized, with
>> a neat but mind-bending program on it. Don Stewart occasionally swoops
>> in with some fixpoint malarkey to defuse heated discussions. I mean
>> that kind of thing, but with a slightly wider scope than just fibs...
>>
>> Suggestions, please!
>>
>> D.
>
> Here's a small puzzle: without using a Haskell interpreter, explain what
> the 'foo' function does.
>
>> foo = filterM (const [True, False])
powerset. Very nice use of the list monad.
--
Aaron Denney
-><-
More information about the Haskell-Cafe
mailing list