[Haskell-cafe] Lazy Lists and IO

Andrew Coppin andrewcoppin at btinternet.com
Thu Jul 12 16:04:47 EDT 2007


Jonathan Cast wrote:
> On Thursday 12 July 2007, Andrew Coppin wrote:
>   
>> Wow.
>>
>> Show me a simple problem, and some Haskeller somewhere will find a
>> completely unexpected way to solve it... LOL!
>>
>> OTOH, doesn't that just mean that Nat is itself a degenerate list, and
>> genericList is just converting one list to another, and the Ord instance
>> for Nat is doing the short-cut stuff?
>>     
>
> Yes.  Nat ~ [()], where ~ means `is isomorphic to'.  But Nat is also the 
> obvious way to encode Peano arithmetic in Haskell, so this is a deep thought, 
> not a shallow one.
>   

That thought was not lost on me. ;-)

I was just thinking that in mundane machine terms, we're not doing 
anything especially remarkable here...



More information about the Haskell-Cafe mailing list