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
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to