Casey Hawthorne wrote:
When folding is there a way to pick out the last point being processed?
I came up with these: safeHead = foldr (const . Just) Nothing safeLast = foldr (flip mplus . Just) Nothing Claude -- http://claudiusmaximus.goto10.org _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe