[REBOL] Associative Data Store Re:(4)
From: al:bri:xtra at: 19-Sep-2000 21:40
> It would be very pleasant, IMHO, to be able to write something like the
following sketch:
> age-grade-tab/put a-g 1 + any [age-grade-tab/get a-g 0]
Will this do?
Associate age-grade-tab a-g 1 + any [associate? age-grade-tab a-g 0]
> foreach k age-grade-tab/keys [
> print [k ":" age-grade-tab/get k]
> ]
How about this?
use [Keys] [
Keys: age-grade-tab
forskip 'Keys 2 [
print [first Keys ":" Associate? Keys]
]
]
> foreach k sort/compare age-grade-tab/keys age-grade-sorter [
> ; with some nice layout tricks not relevant to this point
> ]
foreach [Key Value] sort/compare/skip age-grade-tab age-grade-sorter 2 [
I hope that helps!
Andrew Martin
find/skip select/skip...
ICQ: 26227169
http://members.ncbi.com/AndrewMartin/
http://members.xoom.com/AndrewMartin/