
Thanks Brent, Stephen, Mihai, and Rahul,
I finally understand lambda expressions :) The combination of your comments got me there and "Learn you a haskell" solidified it. I've now written 3 working lambda expression in my life (without copying).
Thanks again,
--Tim
----- Original Message ----
From: Brent Yorgey
myLength xs = foldl addOne 0 xs where addOne x n = n + 1
Almost, Tim's original addOne is actually addOne x n = x + 1 The difference is that the given solution uses foldr whereas Tim was using foldl. Either one works in this case since + is commutative. -Brent _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners