
12 Jan
2012
12 Jan
'12
2:17 a.m.
2012/1/12 Kyle Murphy
I was able to build something incredibly convoluted that accomplishes what you want, but I'm sure there's a better way to do it.
Not sure if it's a better way. unscan l = head l : zipWith (subtract) l (tail l) Corrected to work for empty lists : unscan [] = [] unscan l@(x:xs) = x : zipWith (subtract) l xs David.