
18 Jun
2008
18 Jun
'08
10:30 a.m.
On Wed, 18 Jun 2008, Achim Schneider wrote:
Is there a generalisation of scan1, such that eg.
foo (+) [0,1] (1,2) = [0,1,1,2,3,5,8,13,...]
?
What is the (1,2) for? I could think of foo f = List.unfoldr (\ xt@(x:xs) -> Just (x, xs ++ [f xt])) foo sum [0,1] = [0,1,1,2,3,5,8,13,21,34,...