REBOL Programming/body-of

USAGE:Edit

BODY-OF value 

DESCRIPTION:Edit

Returns a copy of the body of a function or object.

BODY-OF is a function value.

ARGUMENTSEdit

  • value -- (Type: any)

SOURCE CODEEdit

body-of: func [
    {Returns a copy of the body of a function or object.} 
    value
][
    case [
        object? :value [third :value] 
        function? :value [copy/deep second :value] 
        any-function? :value [none] 
        'else [cause-error 'script 'cannot-use reduce ['reflect type? :value]]
    ]
]
Last modified on 27 October 2012, at 22:16