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

[REBOL] Re: Puzzle with FIND and SELECT

From: rgombert:essentiel at: 7-Feb-2003 15:59

Here is a way :
>> numbers: head insert at [1 2 4 5] 3 to-decimal 3
== [1 2 3 4 5] that gives :
>> numbers
== [1 2 3 4 5]
>> find numbers 3
== none
>> select numbers 3
== none
>> foreach num numbers [print [num tab num = 3]]
1 false 2 false 3 true 4 false 5 false
>> foreach num numbers [print [num tab same? num 3]]
1 false 2 false 3 true 4 false 5 false Renaud GOMBERT -------------------------------- www.essentiel.net N SIRET : 418 620 159 N MdA : G316527 NAF/APE : 923A