vle-put-nth

Parent Previous Next

vle-put-nth


(vle-put-nth  lst  idx  val)

sets / replaces the item at index 'idx' in list 'lst' with specified new value 'val'; if 'idx' is larger then the list length, the list is filled with NIL items before 'val'

Arguments

'lst'  input list where the item at position 'idx' is to be set
'idx'  the 0-based index of the item to be set by new 'val'
'val'  the new value to be set for the item at index 'idx'

Return

list 'lst' with item at position 'idx' set to 'val';
if 'idx' is < 0, the unchanged list is returned
if 'idx' is greater than the list length, the list is filled with NIL values before added item 'val'

Example


Alias


Remarks

index 'idx' is 0-based




©  Menhirs NV. All rights reserved.