ColdC: Function/Method Reference: replace()


LIST replace(LIST list, INTEGER pos, ANY value)

This function replaces the element in list specified by pos with value. If pos is less than one or is greater than the length of list, the error ~range is thrown.

Example:

replace([2, 3, 4], 2, 'foo)
=> [2, 'foo, 4]


Last Modified on 24 Mar 1996
Copyright © 1995, 1996, Brandon Gillespie