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

[REBOL] Re: Searching objects

From: robert:muench:robertmuench at: 13-Dec-2001 18:08

> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of > Carl Read > Sent: Thursday, December 13, 2001 1:47 PM > To: [rebol-list--rebol--com] > Subject: [REBOL] Re: Searching objects > The following function might do the job for you, though I's sure there > must be a better way... > > obj-find: func [series field value][ > forall series [if series/1/:field = value [return index? series]] > none > ]
Hi, thanks but that's the O(n) version IIRC? I would like to use the hash! approach/speed but wasn't able to find the right way to do it ;-)). Robert