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

[REBOL] Re: reduce second [one two]

From: anton::wilddsl::net::au at: 14-Jan-2009 14:44

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: