True 'nuff!
On Thu, Sep 30, 2010 at 12:15 PM, Waclaw Kusnierczyk <[email protected]>wrote:
> ... and then you don't really need N as an argument to Loop, as it is
> constant there and can be accessed from the closure:
>
> fun {Fact N}
> fun {Loop I Acc}
>
> if I==N
> then Acc
> else {Loop I+1 (I+1)*Acc.1|Acc}
> end
> end
> in
> {Loop 1 [1]}
> end
>
> --
> vQ
>
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users