< Rebol Programming

USAGE:

FIRST+ 'word 

DESCRIPTION:

Return FIRST of series, and increment the series index.

FIRST+ is a function value.

ARGUMENTS

  • word -- Word must be a series. (Type: word paren)

(SPECIAL ATTRIBUTES)

  • catch

SOURCE CODE

first+: func [
    {Return FIRST of series, and increment the series index.} 
    [catch] 
    'word [word! paren!] "Word must be a series."
][
    if paren? :word [set/any 'word do :word] 
    throw-on-error [also pick get word 1 set word next get word]
]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.