Next: sublist
Prev: setadd
setremove(list, data)This function returns the result of removing the first occurrence of data from list if data exists in list. If data does not exist in list, then
setremove() returns
list unmodified.Examples:
setremove([2, 3, 4, 'foo], 'foo)
=> [2, 3, 4]
setremove([2, 3, 4], 5)
=> [2, 3, 4]
setremove([2, 3, 2, 4], 2)
=> [3, 2, 4]