Skip to content
angerangel edited this page Mar 19, 2013 · 1 revision

USAGE

   EXTEND obj word val

DESCRIPTION

Extend an object, map, or block type with word and value pair.

EXTEND is a function value.

ARGUMENTS

  • obj -- object to extend (modified) (object! map! block! paren!)
  • word (any-word!)
  • val

#SOURCE

extend: make function! [  [
    {Extend an object, map, or block type with word and value pair.}
    obj [object! map! block! paren!] "object to extend (modified)"
    word [any-word!]
    val
][
    if :val [append obj reduce [to-set-word word :val] ]
    :val
] ]
Clone this wiki locally