Repend

angerangel edited this page Jan 7, 2013 · 1 revision
Clone this wiki locally

USAGE

   REPEND series value /part length /only /dup count

DESCRIPTION

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

REPEND is a function value.

ARGUMENTS

  • series -- Series at point to insert (series! port! map! gob! object! bitset!)
  • value -- The value to insert

REFINEMENTS

  • /part -- Limits to a given length or position
    • length (number! series! pair!)
  • /only -- Inserts a series as a series
  • /dup -- Duplicates the insert a specified number of times
    • count (number! pair!)

#SOURCE

repend: make function! [  [
    {Appends a reduced value to a series and returns the series head.}
    series [series! port! map! gob! object! bitset!] "Series at point to insert"
    value "The value to insert"
    /part "Limits to a given length or position"
    length [number! series! pair!]
    /only "Inserts a series as a series"
    /dup "Duplicates the insert a specified number of times"
    count [number! pair!]
][
    apply :append [series reduce :value part length only dup count]
] ]