REBOL Programming/closure?

USAGE:Edit

CLOSURE? value 

DESCRIPTION:Edit

Returns TRUE if it is this type.

CLOSURE? is a function value.

ARGUMENTSEdit

  • value -- (Type: any-type)

SOURCE CODEEdit

closure?: func ["Returns TRUE if it is this type." value [any-type!]][
    all [
        function? get/any 'value 
        value: second :value 
        same? pick value 1 :do 
        same? pick value 2 :make 
        same? pick value 3 :function!
    ]
]
Last modified on 27 October 2012, at 22:15