High time I learned about scanl :p