Rebol Programming/rejoin

From Wikibooks, open books for an open world
< Rebol Programming
Jump to navigation Jump to search

USAGE:[edit | edit source]

REJOIN block 

DESCRIPTION:[edit | edit source]

Reduces and joins a block of values.

REJOIN is a function value.

ARGUMENTS[edit | edit source]

  • block -- Values to reduce and join (Type: block)

SOURCE CODE[edit | edit source]

rejoin: func [
    "Reduces and joins a block of values." 
    block [block!] "Values to reduce and join"
    if empty? block: reduce block [return block] 
    append either series? first block [copy first block] [
        form first block
    ] next block