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

[REBOL] Blocks: nested search

From: robert::muench::robertmuench::de at: 6-Jan-2003 16:38

Hi, has someone done some library functions to use blocks as records? I'm currently using name/value blocks for "database" releated things. While the nested structure is quite nice it makes some "problems" in that sometimes you want it to be nested in other way. Example: test: [a [a1 a2] b [b1 b2] c] This works fine as long as I want to search for a, b or c. But what if I now want to search for a1 or b2? Of course I can iterate through the list... Not very efficient. I'm thinking about using something like an index: index: [a1 [a] a2 [a] b1 [b] b2 [b]] What do you think? Any other ideas? Robert