Discuss this page on this pages TalkPage

lnkReplace

See lnkReplace at Xelerus

Syntax (lnkReplace list index item) → list
Arguments list: The list in which you want to replace an element.
index: The position of the item in the list which you want to replace with a new item.
item: The item you want to place at `index'
Returns A list with the element at `index' replaced with the `item'.
Category list
Description Replaces a element at `index' and returns the resultant list. It also modifies the list in place.

Example

(lnkReplace '(a b c d) 2 'e) -> (a b e d)

Modifying the list in place:

(setq l '(a b))
(lnkReplace l 0 'b)
l -> (b b)

Return to Functions list