Go to the first, previous, next, last section, table of contents.


Collection as a Doubly linked list

The functions in this section treat the collection as a doubly linked list.

(tin-nth collection n)
Return the nth tin. n counts from zero. nil is returned if there is less than n cookies. If n is negative, return the -(n+1)th last element. Thus, (tin-nth dll 0) returns the first node, and (tin-nth dll -1) returns the last node. Use tin-cookie to extract the cookie from the tin (or use cookie-nth instead).
(cookie-nth collection n)
Like tin-nth, but the cookie is returned instead of the tin.
(tin-next collection tin)
Get the next tin. Returns nil if tin is nil or refers to the last cookie in collection.
(tin-previous collection tin)
Get the previous tin. Returns nil if tin is nil or refers to the first cookie in collection.
(cookie-sort collection predicate)
Sort the cookies in collection, stably, comparing elements using predicate. predicate is called with two cookies, and should return `t' if the first cookie is less than the second. The screen representaion of the collection will refreshed after the sort is complete.
(cookie-first collection)
Return the first cookie in collection. The cookie is not removed.
(cookie-last collection)
Return the last cookie in collection. The cookie is not removed.


Go to the first, previous, next, last section, table of contents.