Home Segments Index Top Previous Next

440: Mainline

The powerful inject:into: method, about which you learned in Segment 390, is inherited by all subclasses of the Collection class. You can use it to perform all sorts of computations on collections, such as adding up all the element in a collection filled with numbers or finding the maximum value in such a collection.