Change

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

Table of Contents

USAGE

  CHANGE series value /part length /only /dup count

DESCRIPTION

Replaces element(s); returns just past the change. CHANGE is an action value.

ARGUMENTS

  • series -- At position (modified) (series! gob! port!)
  • value -- The new value (any-type!)

REFINEMENTS

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

SOURCE

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