[Haskell-cafe] Odd lack of laziness

Henning Thielemann lemming at henning-thielemann.de
Fri Jun 22 18:21:39 EDT 2007


On Fri, 22 Jun 2007, Stefan O'Rear wrote:

> length' [] = Zero
> length' (x:xs) = Succ (length xs)

also known as Data.List.genericLength. :-)

See also
  http://darcs.haskell.org/htam/src/Number/PeanoNumber.hs


More information about the Haskell-Cafe mailing list