This is stack.egg.info, produced by makeinfo version 4.7 from eggdoc-output.texi. INFO-DIR-SECTION The Algorithmic Language Scheme START-INFO-DIR-ENTRY * stack.egg: (stack.egg). Provides LIFO queue (stack) operations. END-INFO-DIR-ENTRY  File: stack.egg.info, Node: Top, Next: About this egg, Up: (dir) stack egg ********* Provides LIFO queue (stack) operations. Written by Kon Lovett (mailto:klovett@pacbell.net) This manual corresponds to version 1.3 of the stack extension library for Chicken Scheme. * Menu: * About this egg:: * Documentation:: * License:: * Index::  File: stack.egg.info, Node: About this egg, Next: Documentation, Prev: Top, Up: Top 1 About this egg **************** * Menu: * Version history:: * Requirements:: * Usage::  File: stack.egg.info, Node: Version history, Next: Requirements, Up: About this egg 1.1 Version history =================== `1.3' Exports `1.2' Added clear-stack `1.1' Doc fix [thanks to Toby Butzon], rename of stack-pop-1!, bug fix `1.0' Initial release  File: stack.egg.info, Node: Requirements, Next: Usage, Prev: Version history, Up: About this egg 1.2 Requirements ================ This egg requires the following extensions: `srfi-1 (http://srfi.schemers.org/srfi-1/srfi-1.html)', `syntax-case (http://www.call-with-current-continuation.org/eggs/syntax-case.html)'  File: stack.egg.info, Node: Usage, Prev: Requirements, Up: About this egg 1.3 Usage ========= Load this egg like so: `(require-extension stack)'  File: stack.egg.info, Node: Documentation, Next: License, Prev: About this egg, Up: Top 2 Documentation *************** stack is a set of procedures and macros supporting LIFO queue operations. The stack is treated as an independent object, which is modified in place. In opposition to the common pattern of a variable being re-assinged a new stack representation after each mutating operation. -- macro: make-stack (make-stack [LIST]) Returns a new stack, with optional initial elements from `LIST'. -- macro: clear-stack (clear-stack STACK) Make `STACK' empty. -- macro: stack? (stack? STACK) Is `STACK' a stack? -- macro: stack-empty? (stack-empty? STACK) Returns #t for an empty `STACK', #f otherwise. -- macro: stack-length (stack-length STACK) Returns the number of elements on the `STACK'. -- macro: stack-depth (stack-depth STACK) Returns the index of the last element on the `STACK', or -1 when stack empty. -- macro: stack-peek (stack-peek STACK [INDEX]) Returns the element in `STACK' at `INDEX'. Index must be 0 <= & <= (stack-depth), defaults to 0 (top of stack). -- macro: stack-poke! (stack-poke! STACK VALUE [INDEX]) Changes the `STACK' element at `INDEX' to `VALUE'. Returns the modified stack. The stack is modified in place. Index must be 0 <= & <= (stack-depth), defaults to 0 (top of stack) -- macro: stack-push! (stack-push! STACK VALUE ...) Pushes `VALUE ...' onto the `STACK'. Returns the modified stack. The stack is modified in place. -- macro: stack-pop*! (stack-pop*! STACK) Removes the top element from the `STACK' and returns it. The stack is modified in place. Does not check for the stack-empty condition! -- procedure: stack-pop! (stack-pop! STACK) Removes the top element from the `STACK' and returns it. The stack is modified in place. -- procedure: stack-cut! (stack-cut! STACK START-DEPTH [END-DEPTH]) Removes the `STACK' elements from `START-DEPTH' thru `END-DEPTH' and returns a list of the stack elements. The stack is modified in place. The start-depth must be 0 <= & <= (stack-depth). The end-depth must be start-depth <= & <= (stack-depth), defaults to start-depth. -- macro: list->stack (list->stack LIST) Returns the `LIST' as a stack. The resulting stack may share memory with the list and the list should not be modified after this operation. -- macro: stack->list (stack->list STACK) Returns the `STACK' as a list, where the first element of the list is the top element of the stack. The resulting list may share memory with the stack object and should not be modified. -- macro: stack-for-each (stack-for-each STACK PROCEDURE) Applies the `PROCEDURE' to each element of the `STACK', in order of top to bottom. -- macro: print-stack (print-stack STACK) Prints the elements of the `STACK' to the (current-output-port).  File: stack.egg.info, Node: License, Next: Index, Prev: Documentation, Up: Top 3 License ********* Copyright (c) 2005, Kon Lovett. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  File: stack.egg.info, Node: Index, Prev: License, Up: Top Index ***** [index] * Menu: * clear-stack: Documentation. (line 18) * list->stack: Documentation. (line 85) * make-stack: Documentation. (line 13) * print-stack: Documentation. (line 106) * stack->list: Documentation. (line 92) * stack-cut!: Documentation. (line 76) * stack-depth: Documentation. (line 38) * stack-empty?: Documentation. (line 28) * stack-for-each: Documentation. (line 100) * stack-length: Documentation. (line 33) * stack-peek: Documentation. (line 44) * stack-poke!: Documentation. (line 50) * stack-pop!: Documentation. (line 70) * stack-pop*!: Documentation. (line 63) * stack-push!: Documentation. (line 57) * stack?: Documentation. (line 23)  Tag Table: Node: Top240 Node: About this egg588 Node: Version history771 Node: Requirements1057 Node: Usage1385 Node: Documentation1542 Node: License4789 Node: Index5971  End Tag Table