Cold Help System: Programming: ColdC Reference Manual: Functions: List: replace()


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

This function replaces the element in the argument list--pointed to by the position argument pos--with the argument value, and returns the result. If the position argument is outside the range of the list, the error ~range is thrown. Example:

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


delete() | insert() | join() | listgraft() | listlen() | replace() | setadd() | setremove() | sublist() | union() | listidx()


the Cold Dark