REBOL Programming/does

USAGE:Edit

DOES body 

DESCRIPTION:Edit

A shortcut to define a function that has no arguments or locals.

DOES is a function value.

ARGUMENTSEdit

  • body -- The body block of the function (Type: block)

(SPECIAL ATTRIBUTES)Edit

  • catch

SOURCE CODEEdit

does: func [
    {A shortcut to define a function that has no arguments or locals.} 
    [catch] 
    body [block!] "The body block of the function"
][
    throw-on-error [make function! [] body]
]
Last modified on 27 October 2012, at 22:12