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

[REBOL] Multiple Find Function

From: reboler::programmer::net at: 20-Feb-2002 19:21

Is the output of the following what you wanted? Anybody have improvements? To search blocks try multi-find to-string yourblock value. multi-find: func [ "Find multiple instances of a value in a series and output their index position" ser [series!] "series to search" val "value to find" /local found out ][ out: copy/deep reduce [val []] parse ser [any [thru val found: (append out/2 (index? found) - length? val)]] return out ]