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

[REBOL] Puzzle with FIND and SELECT

From: joel:neely:fedex at: 7-Feb-2003 6:27

Here's a console transcript, unedited except for the blank line I've inserted between consecutive expressions/results for readability:
>> 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 I'll post separately the solution to this little mystery, to allow some pondering time for anyone who's interested in working it out uncontaminated by the solution. -jn-