Jump to content

Rebol Programming/repend

From Wikibooks, open books for an open world

USAGE:

[edit | edit source]
REPEND series value /only 

DESCRIPTION:

[edit | edit source]

Appends a reduced value to a series and returns the series head.

REPEND is a function value.

ARGUMENTS

[edit | edit source]
  • series -- (Type: series port)
  • value -- (Type: any)

REFINEMENTS

[edit | edit source]
  • /only -- Appends a block value as a block

SOURCE CODE

[edit | edit source]
repend: func [
    {Appends a reduced value to a series and returns the series head.} 
    series [series! port!] 
    value 
    /only "Appends a block value as a block"
][
    head either only [
        insert/only tail series reduce :value
    ] [
        insert tail series reduce :value
    ]
]