Next: , Previous: LinkedList-accessing, Up: LinkedList


1.101.2 LinkedList: adding

add: aLink
Add aLink at the end of the list; return aLink.


addFirst: aLink
Add aLink at the head of the list; return aLink.


addLast: aLink
Add aLink at then end of the list; return aLink.


remove: aLink ifAbsent: aBlock
Remove aLink from the list and return it, or invoke aBlock if it's not found in the list.


removeFirst
Remove the first element from the list and return it, or error if the list is empty.


removeLast
Remove the final element from the list and return it, or error if the list is empty.