Often you need a special function for the first element in a collection, and the last element. The cycle method lets you pass up to three functions which are respectively applied to the middle, front, and end of a collection.