Hi,
> But now the context thing comes in for real, ;-)
> Look at the following console session
>
> -- Start of console session --
> >> a: 0 f: func [] [a]
> >> o1: make object! [a: 1 g: func [] [a]] o1/g
> == 0
> >> o2: make object! append [a: 2 g:] [:f] o2/g
> == 0
> >> o3: make object! append [a: 3 g:] compose/deep [first [(:f)]]
o3/g
> == 0
> >> o4: make object! append [a: 4 g:] reduce ['first reduce [:f]]
o4/g
> == 0
> >> o5: make object! append [a: 5 g:] reduce ['func first :f
second :f] o5/g
> == 5
> >> o1/g o2/g o3/g o4/g o5/g a
> 1
> 5
> 5
> 5
> 5
> 0
> -- End of console session --
>
> o1 is okay, anyway.
> The making of o3 and o4 are equivalent IMHO (o3 are Gabriele's
idea, o4 Ladislav's).
> o5 is my own approach, it keeps care of contexts, but - as
Ladislav pointed out - doesn't work for
> native!s and action!s.
>
> Any idea on how an o6 can be done, which preserves context *and*
works for
> native!s and action!s?
>
> And finally, why do I get that strange 1 5 5 5 5 0 results? How
does o2 to o4
> know about o5's a: 5? Lots of homework to do ...
>
> Regards
>
> Christian
> [EMAIL PROTECTED]
>
Your results differ from mine, I would suggest you to try once
more...
Regarding universality/contexts. You can try a mixed approach:
append spec either function? :f reduce [
['func third :f second :f]
] [
['first reduce [:f]]
]
Ladislav