2 - Two interfaces
Sequence Interface
given
- Container:
build(X)
- build a sequence from items in X.len()
- return the number of stored items.
- Static:
iter_seq()
- return stored items in sequence order.get_at(i)
- return the item at index.
-set_at(i,x)
- replace the item at indexwith .
- Dynamic:
-insert_at(i,x)
- addas the item with index . insert_first(x)
-addas the first item. insert_last(x)
-addas the last item. delete_at(i)
- remove and return the item at index. delete_first()
remove and return the first item.delete_last()
remove and return the last item.