On Sep 19, 2007, at 23:17 , PR Stanley wrote:

length = foldr (. n . 1 + n) 0
Any idea how to define length with foldr. The above definition doesn't make much sense.

Still fighting with the botched OCR?

length = foldr (\_ n -> 1 + n) 0

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to