REBOL [
Type: 'module
Exports: [old-to-word]
]
old-to-word: func [wd][
attempt [
bind/new to word! wd system/contexts/user
]
]
bind-to-something: func ['wd /or ctx [object! module!]][
any [
all [
ctx
in :ctx :wd
bind :wd ctx
]
all [
in system/contexts/user :wd
bind :wd system/contexts/user
]
all [
in system/contexts/sys :wd
bind :wd system/contexts/sys
]
all [
in system/contexts/natives :wd
bind :wd system/contexts/natives
]
]
]
old-to-word: func [wd [any-string!]][
all [
wd: to word! wd
any [
bind-to-something :wd
:wd
]
]
]