LinkedList.eraseIter

Deletes an entry from the list by its iterator.

Arguments

iterator
is a ListIterator to delete an entry by. The iterator and all ranges that include it a “first” or an “end” iterator become invalid. If the iterator is an “end” iterator, an error will occur.

Return values

None

Complexity

Constant

Example

"sl/linkedList" useFile a: (1 2 0 5 45 3 54 98) makeList; a [it:; it.get 2 mod 0 = [it a.eraseIter] when TRUE] enumIter a [it:; it.get print "," print TRUE] enumIter
Output:
1,5,45,3,