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

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to