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

[REBOL] Re: hash questions

From: joel:neely:fedex at: 8-Jan-2002 6:32

Arrrrghhhh! CUT/PASTE TYPO WARNING! Joel Neely wrote:
> assoc: make object! > [ data: [] > default: 0 > clear: func [] [data: copy []] > store: func [k [string!] v [string!] /local pos] > [ pos: find/skip data k 2 > either found? pos > [ change next pos v] > [ append append data k v] > ] > fetch: func [k [string!] /local r] > [ either found? r: select/skip data 2 k [r] [default]]
[ either found? r: select/skip data k 2 [r] [default]]
> ] >
My apologies for the error! -JN- -- ; sub REBOL {}; sub head ($) {@_[0]} REBOL [] # despam: func [e] [replace replace/all e ":" "." "#" "@"] ; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"} print head reverse despam "moc:xedef#yleen:leoj" ;