
6 May
2010
6 May
'10
10:07 p.m.
On Fri, 2010-05-07 at 02:15 +0100, Maciej Piechotka wrote:
myArr :: Num a => FoldlArrow a (a, a) (a, a) myArr = proc (l, s) -> do e <- element -< () returnA -< (l + 1, s + e)
It starts consuming memory as well. Somewhere is lazy passing of value but I cannot find where
Ok. Should be: myArr :: Num a => FoldlArrow a (a, a) (a, a) myArr = proc (l, s) -> do e <- element -< () let !l' = l + 1 let !s' = s + e returnA -< (l', s') Regards