iterate (\f -> zipWith (+) f (0:f) ++ [1]) [1]
iterate(\f->zipWith(+)f(0:f)++[1])[1]iterate((++[1]).((0:)>>=zipWith(+)))[1]iterate(foldr(\v(p:q)->v:(p+v):q)[0])[1]
--
You received this message because you are subscribed to the Google Groups "Bay Area Haskell Users Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/bahaskell/-/ZXJtlg_4UqMJ.
To post to this group, send email to baha...@googlegroups.com.
To unsubscribe from this group, send email to bahaskell+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bahaskell?hl=en.
If it's the asymmetry that you don't like, there's always: iterate (\f
-> zipWith (+) ([0] ++ f) (f ++ [0])) [1]
Shachaf
I agree -- appending to the end of a list isn't as nice as your fold.
Shachaf