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

[REBOL] Re: Don't understand "try" and "disarm"

From: tim-johnsons:web at: 15-Mar-2006 10:53

* Jeff Massung <massung-gmail.com> [060315 09:05]:
> One important concept that REBOL can simulate, but doesn't have > intrinsically, that I miss from Lisp is that of keywords. Keywords (in Lisp) > are symbols that are bound to themselves. This is used for many things, but > most commonly for enumerated values. >
;; Do you mean like this:
>> test: [a 1 b "two" c 3.3]
== [a 1 b "two" c 3.3]
>> select test a
** Script Error: a has no value ** Near: select test a
>> test test 'a ;; word must be quoted
== a
>> test/a ;; if 'placeholder' is word, can be path
== 1
>> test/b
== "two"
>> test/c
== 3.3 ;; ;; Or this (I know a little lisp, but know python better def td(**kw): for k in kw: ## do something with k, but check against ## internal dictionary print td(bgcolor="red",align="right",data="cell contents") Can be emulated in rebol, but haven't tried it. tim -- Tim Johnson <tim-johnsons-web.com> http://www.alaska-internet-solutions.com