Next: istacks ralists, Previous: istacks lists, Up: istacks [Index]
The library (vicare containers istacks ilists) provides a
concrete implementation of the <istack> type using immutable lists
as storage; immutable lists are defined by the library (vicare
containers ilists), Immutable lists.  Usage example:
(import (vicare) (vicare containers istacks) (vicare containers istacks ilists)) (define S (make-istack-ilist)) (istack-push! S 0) (istack-push! S 1) (istack-push! S 2) (istack-top S) ⇒ 2 (istack-pop! S) ⇒ 2 (istack-pop! S) ⇒ 1
The following syntactic bindings are exported by the library
(vicare containers istacks ilists).
Record type implementing an <istack>, of which it is a
subtype.
Build and return a new instance of <istack-ilist>.  The
optional argument ell must be a proper immutable list (or null)
representing the initial contents of the stack, with the car of the list
being the top object.
Return #t if obj is an instance of <istack-ilist>;
otherwise return #f.
Return null or the first pair of the list used as storage in the
<istack-ilist> instance istack.