Jump to content

Rebol Programming/insert

From Wikibooks, open books for an open world

USAGE:

[edit | edit source]
INSERT series value /part range /only /dup count 

DESCRIPTION:

[edit | edit source]

Inserts a value into a series and returns the series after the insert.

INSERT is an action value.

ARGUMENTS:

[edit | edit source]
  • series -- Series at point to insert (Type: series port bitset)
  • value -- The value to insert (Type: any-type)

REFINEMENTS:

[edit | edit source]
  • /part -- Limits to a given length or position.
    • range -- (Type: number series port pair)
  • /only -- Inserts a series as a series.
  • /dup -- Duplicates the insert a specified number of times.
    • count -- (Type: number pair)

SOURCE CODE

[edit | edit source]
insert: native[
    {Inserts a value into a series and returns the series after the insert.} 
    series [series! port! bitset!] "Series at point to insert" 
    value [any-type!] "The value to insert" 
    /part "Limits to a given length or position." 
    range [number! series! port! pair!] 
    /only "Inserts a series as a series." 
    /dup "Duplicates the insert a specified number of times." 
    count [number! pair!]
]