11 Dec
2006
11 Dec
'06
2:18 a.m.
On 12/9/06, Ranjan Bagchi <ranjan.bagchi@frotz.com> 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 <taralx@gmail.com> "You can't prove anything." -- Gödel's Incompetence Theorem