Ah, thanks!

b

On Thu, Apr 29, 2010 at 11:37 AM, Daniel Fischer
<daniel.is.fisc...@web.de> wrote:
> Am Donnerstag 29 April 2010 20:08:00 schrieb Ben:
>> A technical question: it seems like the instance of ArrowLoop is too
>> strict (this is something I've wondered about in Liu's paper too.)
>> Shouldn't it be
>>
>>  instance ArrowLoop SFAuto where
>>      loop (SFAuto s f) = SFAuto s f'
>>          where
>>            f' (b, s1) = let (~(c, d), s2) = f ((b, d), s1)
>>                         in (c, s2)
>
> Let-bindings are already lazy, so the '~' makes no difference here.
> Apart from the readability, both are the same as
>
> where
>  f' (b,s1) = let x = f ((b, snd $ fst x),s1) in (fst $ fst x, snd x)
>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to