
10 Dec
2006
10 Dec
'06
8:32 p.m.
Thank you -- turns out that mapAccumL did exactly what I wanted it to, push state through processing a very large list. Thanks, Ranjan On Dec 10, 2006, at 10:18 AM, Taral wrote:
On 12/9/06, Ranjan Bagchi
wrote: Which is great.. however, what I'd like to fold the list over a tuple:
foo x (l,payload) = ((x:l), payload) (x,_) = foldr foo ([], Nothing) [1..] (take 10) x
Doesn't terminate, until the stack overflows
Look at Data.List's mapAccumR function.
-- Taral
"You can't prove anything." -- Gödel's Incompetence Theorem