Next: , Previous: , Up: chains   [Index]


35.3 Inspecting chain objects

The following syntactic bindings are exported by the library (vicare containers chains). The bindings whose name is prefixed with $ are unsafe operations: they do not validate their arguments before accessing them.

Function: chain-length? chain
Function: $chain-length? chain

Return a non–negative exact integer representing the number of objects in chain. In counting the links: proceed both in forwards and backwards directions. Circular chains are forbidden.

Function: chain-forwards-length? chain
Function: $chain-forwards-length? chain

Return a non–negative exact integer representing the number of objects in chain in the forwards direction, including chain. Circular chains are forbidden.

Function: chain-backwards-length? chain
Function: $chain-backwards-length? chain

Return a non–negative exact integer representing the number of objects in chain in the backwards direction, including chain. Circular chains are forbidden.