Home Segments Index Top Previous Next

420: Mainline

To create a bag, you send a new message to Bag. To add an element, you send add: with an argument.

Because the elements are in no particular order, you cannot use methods such as addFirst:, first, and removeFirst.