Ciao, Gabriele,
it doesn't work, try RECYCLE, or
see my last version of CURRY, which is working.
The problem here is, that you don't know it isn't working, until something
unexpected happens...
Ladislav
> [EMAIL PROTECTED] wrote:
>
> > I have to disagree. When you return an inner function, you have
>
> I'm sorry I disagree again. Your problem there is about contexts,
> not function. You are referencing a word bound to a static
> context. Use a dynamic context instead:
>
> curried-sum: func [
> a [number!]
> ] [
> use [c] [
> c: a
> func copy [
> b [number!]
> ] copy [
> c + b
> ]
> ]
> ]
>
> >> sum2: curried-sum 2
> >> sum3: curried-sum 3
> >> sum4: curried-sum 4
> >> sum2 3
> == 5
> >> sum3 3
> == 6
> >> sum4 3
> == 7
>
> Ciao,
> /Gabriele./
> o--------------------) .-^-. (----------------------------------o
> | Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
> | GIESSE on IRC \ \-\_/-/ / http://www.amyresource.it/AGI/ |
> o--------------------) `-v-' (----------------------------------o
>
>