Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] R: Re: reduce second [one two]

From: gchillemi:aliceposta:it at: 14-Jan-2009 7:47

> 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.)
In fact I have reported it as a bug making a mistake because I presumed that two: 2 Probe REDUCE second [one two] was the same of two: 2 probe REDUCE TWO Instead "second [one two]" returns 'TWO rather than TWO which is a thing you don't notice in the consolle as the ouput is TWO in both situations.
> To reduce a word to its value, use GET. > > probe get 'two > > or > > probe get second [one two]
The latter is the answer I have been searching for. Thanks in advance Giuseppe Chillemi