My cheat is to parse backwards. I reverse the series, parse and change as I go, and when I hit a slot that doesn't carry, I break out to the end. If I carry all the way, I grow by appending. The last thing I do is reverse the series again.
Not sure how you could do it without +/-.
>> c: context [a: 2] == make object! [ a: 2 ] >> a: 1 == 1 >> ac: context? 'a == make object! [ datatype!: datatype! unset!: unset! none!: none! logic!: logic! block!: block! paren!: paren! string!: string! file!: file! >> set 'a bind 'a c == a >> print a a >> print get a 2 >> get in c 'a == 2
bindingis kinda of a pointer to a specific
contextis a namespace with entrys, every entry is a
word: valuepair, simpy speaking. Is everything correct?
bind <word> <context>. Am I wrong?
Red  c: context [a: 2] a: 1 probe context? in c 'a
print :in = :bind:smile:
Red  c: context [a: 2] a: 1 probe context? bind 'a c
a: 1, but in local we have
aword is bounded to a global context, there it has associated entry
a: 1, hence it's value is
abinding, I should use
bind 'a local-context. Now, in this local context,
ahas associated entry
a: 2, hence its value should be
a: 1entry in a global context to which I can revert back with
bind 'a global-context.
Red  c: context [a: 2] a: 1 print equal? (probe context? in c 'a) (probe context? bind 'a c)
bindare the same thing