[REBOL] Re: Set-words and refinements
From: al:bri:xtra at: 14-Nov-2000 23:50
Brett wrote:
> 1) Any more of these?!
It extends to strings as well:
>> s: "mary had a little lamb"
== "mary had a little lamb"
>> s/10: #"X"
== "mary had X little lamb"
Blocks, too:
>> b: [print "hello"]
== [print "hello"]
>> b/1: 'prin
== [prin "hello"]
> 2) Can I build an object that behaves like that? And if not, then RT,
could I could I please please..? It looks kinda cool.
And with objects as well:
>> o: make object! [
[ m: 123
[ ]
>> o/m
== 123
>> o/m: 456
== 456
>> probe o
make object! [
m: 456
]
Much easier than other popular scripting languages.
Andrew Martin
ICQ: 26227169
http://members.nbci.com/AndrewMartin/