Rebol Programming/repend

USAGE:

edit
REPEND series value /only 

DESCRIPTION:

edit

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

REPEND is a function value.

ARGUMENTS

edit
  • series -- (Type: series port)
  • value -- (Type: any)

REFINEMENTS

edit
  • /only -- Appends a block value as a block

SOURCE CODE

edit
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
    ]
]