
24 Aug
2008
24 Aug
'08
9:11 a.m.
Sean Leather wrote:
Can you examples of both naive definitions and fast definitions of Nat? I'm curious.
Besides naive or fast, there is also lazy. So for example, using lazy naturals, the expression genericLength x < genericLength y only forces enough of x and y to determine which is longer. Here is John Meacham's implementation: http://www.haskell.org/pipermail/haskell-cafe/2007-October/033213.html Regards, Yitz