Insert

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

USAGE

   INSERT series value /part length /only /dup count

DESCRIPTION

Inserts element(s); for series, returns just past the insert.

INSERT is an action value.

ARGUMENTS

  • series -- At position (modified) (series! port! map! gob! object! bitset! port!)
  • value -- The value to insert (any-type!)

REFINEMENTS

  • /part -- Limits to a given length or position
    • length (number! series! pair!)
  • /only -- Only insert a block as a single value (not the contents of the block)
  • /dup -- Duplicates the insert a specified number of times
    • count (number! pair!)

#SOURCE

insert: make action! [  [
    {Inserts element(s); for series, returns just past the insert.}
    series [series! port! map! gob! object! bitset! port!] "At position (modified)"
    value [any-type!] "The value to insert"
    /part "Limits to a given length or position"
    length [number! series! pair!]
    /only {Only insert a block as a single value (not the contents of the block)}
    /dup "Duplicates the insert a specified number of times"
    count [number! pair!]
] ]