REBOL Programming/insert

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

USAGE:[edit]

INSERT series value /part range /only /dup count 

DESCRIPTION:[edit]

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

INSERT is an action value.

ARGUMENTS:[edit]

  • series -- Series at point to insert (Type: series port bitset)
  • value -- The value to insert (Type: any-type)

REFINEMENTS:[edit]

  • /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]

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