REBOL Programming/does

From Wikibooks, open books for an open world
< REBOL Programming
Jump to: navigation, search

USAGE:[edit]

DOES body 

DESCRIPTION:[edit]

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

DOES is a function value.

ARGUMENTS[edit]

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

(SPECIAL ATTRIBUTES)[edit]

  • catch

SOURCE CODE[edit]

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]
]