Created
August 2, 2018 03:02
-
-
Save giesse/cc603fcbcdbcf771c5cce242a9e9fd29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [] | |
export: func [ | |
"Export a value to the global context" | |
'word [set-word!] | |
value | |
/to ctx [any-word! any-object! function!] | |
] [ | |
set word :value | |
unless :ctx [ctx: system/words] | |
set bind word ctx :value | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Examples: