forked from rebol/rebol
-
Notifications
You must be signed in to change notification settings - Fork 2
Function
angerangel edited this page Mar 19, 2013
·
1 revision
FUNCTION spec vars body
Defines a user function with local words.
FUNCTION is a function value.
- spec -- Optional help info followed by arg words (and optional type and string) (block!)
- vars -- List of words that are local to the function (block!)
- body -- The body block of the function (block!)
#SOURCE
function: make function! [ [
"Defines a user function with local words."
spec [block!] {Optional help info followed by arg words (and optional type and string)}
vars [block!] "List of words that are local to the function"
body [block!] "The body block of the function"
][
make function! copy/deep reduce [compose [(spec) /local (vars)] body]
] ]