
12 Jun
2009
12 Jun
'09
2:57 a.m.
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