Ladislav, are you familiar with the old American (advertising)
expression, "He's been eating his Wheaties!" ?
[EMAIL PROTECTED] wrote:
>
> Problem:
>
> 1) When trying code:
>
> ((func [] [print "Executed"]))
>
> with the result:
>
> >> ((func [] [print "Executed"]))
> >>
>
> One is immediately tempted to draw:
>
> (i) Rebol functions evaluate to themselves.
>
> What do you think about that?
>
Well, considering the following:
>> func [] [print "Executed"]
>> f: func [] [print "Executed"]
>> f
Executed
>> :f
>>
>> get 'f
>> type? get 'f
== function!
>> do 'f
Executed
>> do func [] [print "Also evaluated!"]
Also evaluated!
I'd draw a slightly different conclusion:
Unevaluated REBOL functions (such as the result of evaluating
'func, or the result of 'get on a word which is bound to a
function) have no printable representation.
The effect of evaluating a REBOL function (as when evaluating
a word which is bound to a function, or when evaluating 'do
with a function value as its argument) depends on the content
of the function's body.
Thoughts?
-jn-