Hi Giuseppe,
SECOND returns a word, and REDUCE does not
reduce a word to its associated value.
(REDUCE does reduce words inside a block
that it is passed, so this might seem
strange.)
To reduce a word to its value, use GET.
probe get 'two
or
probe get second [one two]
but of course you need to know in advance
that the item in the block is a word.
If not, then you must do some tests on the
item to see what type it is before
evaluating/reducing/getting it.
Anton.
Giuseppe Chillemi wrote:
> Hello,
> I tought it was a bug but it seems a feature:
>
> Whith the following script
>
> two: 2
> probe reduce second [one two]
>
> I get "TWO" as result when I expected "2".
> An user told me that "second [one two]" returns 'TWO instead of TWO. I do
> I get TWO and have it reduced to "2" ?
>
> Giuseppe Chillemi
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.