Hi Eric,
interesting and worthwhile observations, regarding the use of examples in
place of datatypes.
However,
you report that
>>> third :f
>== [x [decimal!]]
>>> first second third :f
>== decimal!
>>> type? first second third :f
>== datatype!
in other words, the type designator we provided when we constructed the
function
a) continues to be a type designator as demonstrated by
>>> type? first second third :f
>== datatype!
b) it is the type designator we originally used to construct the function
>>> first second third :f
>== decimal!
>
>So if you try to recycle THIRD :F to construct a new function, REBOL will
>see a datatype,
it will see a value, decimal! of type datatype!. Exactly the same as it
does when you originally constructed the function:
>> type? decimal!
== datatype!
>and use that as a sample in creating a new function:
It will, will it? We know that. But why? That's the whole point that needs
to be explained, if you are going to treat your observation as a puzzle and
provide a solution.
How is the decimal! in
f: func [x [decimal!]] []
different from decimal! in
g: func third :f []
where third :f evaluates to
[x [decimal!]]
Both times decimal's datatype is datatype! and both values are decimal!.
Look at this:
>> y: first second third :f
== decimal!
>> h: func [x [y]] []
>> source h
h: func [x [decimal!]][]
Why doesn't your "explanation"
"and use that as a sample in creating a new function:"
apply in the h example function?
;- Elan >> [: - )]