The snakes Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The snakes Reference Manual

This is the snakes Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 15:45:47 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Snakes

Python style generators for Common Lisp. Includes a port of itertools.

Generators

Generators are functions that lazily return a sequence of items, one item per call. Eg:

CL-USER> (defvar genr (list->generator '(1 2 3 4)))
GENR
CL-USER> (funcall genr)
1
CL-USER> (funcall genr)
2
CL-USER> (funcall genr)
3

Generators retain state information between calls. They're useful for stepping through finite resources such as files and lists, but they can also be infinite, as when used for creating mathematical sequences.

Perhaps their most useful feature is an ability to be chained together, analogous to the way in which unix utilities can be piped together. They have a clean interface that encourages the creation of stackable, reusable tools.

While generators are not the most computationally efficient way to solve most problems, they're elegant in use and great for rapid prototyping.

Homepage

Snakes can be found here: https://github.com/BnMcGn/snakes

Installation

Snakes is available in quicklisp:

(ql:quickload 'snakes)

Snakes has been tested on sbcl 1.0.55, clisp 2.49, and clozure 1.10-r16196 under linux.

Examples

Creating

> (defgenerator some-numbers ()
    (loop for i from 1 upto 3 do (yield i))
    (print 'some-message)
    (loop for i from 8 upto 9 do (yield i)))

When the generator is first called, it commences execution at the beginning of its body. When a yield call is reached, the generator returns the yielded value, surrendering execution to the calling code. The next time the generator is called, it continues execution just past the yield where it last stopped. If or when execution reaches the end of the block, the generator terminates.

Note: defgenerator doesn't create a generator. It defines a function that returns a new generator each time it is called.

Consuming

> (mapc-generator #'print (some-numbers))
1
2
SOME-MESSAGE
3
8
9

Anonymous generator

> (with-yield
    (dotimes (i 10)
      (yield (expt 2 i))))

#<BASIC-GENERATOR {C0131CD}>

More consumption options

> (generator->list (with-yield
		         (dotimes (i 10)
			   (yield (expt 2 i)))))
(1 2 4 8 16 32 64 128 256 512)

> (take 3 (with-yield
            (dotimes (i 10)
          (yield (expt 2 i)))))
(1 2 4)

> (do-generator (item (some-numbers))
                  (when (< 3 item)
                    (return item)))
SOME-MESSAGE 
8

Pipe-able generator

> (defgenerator add2 (some-gen)
     (do-generator (x some-gen)
       (yield (+ 2 x))))
ADD2
> (generator->list (add2 (some-numbers)))
SOME-MESSAGE 
(3 4 5 10 11)	      

Yield-all

> (defgenerator flatten (list)
    (when list
      (cond
        ((atom list)
         (yield list))
        (t
         (yield-all (flatten (car list)))
         (yield-all (flatten (cdr list)))))))
> (mapc-generator #'print (flatten '((a (b c) d) (e) f (g h))))
A
B
C
D
E
F
G
H

Yield-all should only be used inside of a defgenerator or with-yield block. It expects a generator, which it consumes and emits through its enclosing generator.

More generator examples can be found in itertools.lisp. Documentation for the original python itertools is here

For Python Programmers

Examples

Seeing that snakes was created to make the python emigré (author included) more comfortable in Common Lisp, here are some transitional examples:

Python:

(x/2 for x in iter)

Snakes:

(with-yield
  (do-generator (x iter)
    (yield (/ x 2))))

Snakes' goal is to recreate the concept of python generators while staying within the bounds of lisp idiom. Its goal is not to look like python, so it doesn't implement for... in style syntax. Not to say it can't be done: see ergolib.

Python:

[x/2 for x in iter]

Snakes:

(collecting
  (do-generator (x iter)
    (collect (/ x 2))))

Don't use generators if you want to immediately build a list. You're better off using either the collect keyword from the loop macro or one of the collectors macros. Collecting, above, comes from the cl-utilities which also has a nice, simple with-collectors macro. The arnesi library has a more powerful with-collectors, plus some interesting alternatives.

Python:

for i, val in enumerate(iter):
	...

Snakes:

(do-generator (i val (enumerate iter))
  ...

Python:

([x for x in y] for y in [[1, 2, 3], [5, 4]] if pred(x))

Snakes:

(with-yield
  (loop for y in '((1 2 3) (5 4))
    do (yield 
         (loop for x in y	
         	when (funcall pred x)
       	  collect x))))

Snakes yield works with loop, do, dolist, iterate and recursive iteration.

About values

Common Lisp has a feature called values (see the values function and stuff that starts multiple-value-) that is not found in python. It is the return value analogue of optional parameters.

For example, the floor function:

> (floor 2.56)
2
0.55999994

It returns both the integer value that you would expect, plus the fractional portion of the number as the second value. In normal operation that second value will be discarded. To access it, something like multiple-value-bind, multiple-value-list or nth-value is needed.

Snakes generators are multiple-values capable. If yield is called with multiple parameters, it will by default emit them as separate values. This behavior can be modified with the *snakes-multi-mode* variable. Its default setting is :values. Set it to :list during generator creation for more python-like behavior in generators like izip, permutations, and combinations.

> (generator->list (combinations '(1 2 3) 2))
(1 1 2)
(2 3 3)
> (generator->list (let ((*snakes-multi-mode* :list))
                     (combinations '(1 2 3) 2)))
((1 2) (1 3) (2 3))

Yield as a function

In snakes, yield is a locally defined function, not a keyword. It can only be called from within a with-yield or defgenerator block. Unlike the python version, it can be called from functions defined with the block, even when those functions are stacked a few layers deep in recursion. For an example see the definition of products, permutations, combinations or combinations-with-replacement in the itertools.lisp file.

Generators are functions

Snakes generators don't have a "next" method. They are directly funcallable; that is to say, they are the "next" method.

Other generator creation issues

Can plain functions or closures be used as generators? Yes. For example:

> (lambda (x)
    (lambda () x))

will work as an infinite generator that returns only one value. The caveat being that the generatorp function will not be able to recognize it as a generator. So far that's not a problem: nothing uses generatorp, but future code may do so. Therefore:

> (lambda (x)
    (gen-lambda () x))

You can use the gen-lambda macro for the inner lambda. It wraps your lambda in a (funcallable) basic-generator object.

Stopping the generator correctly is the other problem.

Unlike python, which raises an exception to signal generator termination, snakes generators emit the snakes:generator-stop symbol. The initial implementation of snakes used a signal as a stop marker. Because with-yield/yield is based on cl-cont, code meant to be run inside of a with-yield or defgenerator block could not handle signals. This necessitated some inefficient work-arounds. The other option - using the values channel to signal cessation - would mean that the values channels would not be free for user purposes.

Once a generator emits snakes:generator-stop, it should continue to do so every time it is called. There is a convenience macro to make this behavior easier to accomplish: gen-lambda-with-sticky-stop

> (defun function->generator (source-func predicate)
  "Returns a generator that repeatedly calls source-func, tests the result against the predicate function, terminates when the predicate tests false, otherwise yielding the result"
    (gen-lambda-with-sticky-stop ()  
      (let ((res (funcall source-func)))
    (if (funcall predicate res)
        res
        (sticky-stop)))))

When sticky-stop is called it returns the generator-stop symbol. In subsequent calls to the function, none of the body code will be run. Generator-stop will be returned each time.

Adaptors

How to interface with other Common Lisp iteration and generation tools.

Loop

Consuming a snakes generator from within loop:

> (loop with g = (some-numbers)
	for val = (funcall g)
until (eq 'generator-stop val)
...	

Iterate

Iterate can step over generators in the same way as loop. There is also an extension for consuming snakes generators in iterate.

  > (iter (for x in-generator (some-numbers))
          (print x))
  (1)
  (2)
  SOME-MESSAGE
  (3)
  (8)
  (9)

  > (iter (for (x) in-generator (some-numbers))
          (print x))
  1
  2
  SOME-MESSAGE
  3
  8
  9

The in-generator extension will bind the values list from the generator to the variable by default. Wrapping one or more variables in a list, as in the second example above, causes the individual values to be destructured into the variables. Eg:

> (iter (for (i x) in-generator (enumerate (list->generator '(3 2 1))))
    (summing (* i x)))
4

Author

Ben McGunigle (bnmcgn at gmail.com)

Based on this code by Frédéric Jolliton.

Copyright

Copyright (c) 2014-2015 Ben McGunigle

License

Apache License version 2


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 snakes

Author

Ben McGunigle <bnmcgn@gmail.com>

License

Apache 2.0

Description

Python style generators for Common Lisp.

Dependencies
Source

snakes.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 snakes.asd

Location

snakes.asd

Systems

snakes (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 snakes/package.lisp

Parent

snakes (system)

Location

package.lisp

Packages

snakes


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 snakes/util.lisp

Dependency

package.lisp (file)

Parent

snakes (system)

Location

util.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 snakes/snakes.lisp

Dependencies
Parent

snakes (system)

Location

snakes.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 snakes/do-generators.lisp

Dependency

snakes.lisp (file)

Parent

snakes (system)

Location

do-generators.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.6 snakes/itertools.lisp

Dependency

do-generators.lisp (file)

Parent

snakes (system)

Location

itertools.lisp

Exported Definitions
Internal Definitions

append! (function)


Previous: , Up: Lisp files   [Contents][Index]

3.1.7 snakes/iterate.lisp

Dependency

itertools.lisp (file)

Parent

snakes (system)

Location

iterate.lisp

Internal Definitions

clause-for-in-generator-1 (macro)


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 snakes

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *snakes-multi-mode*
Package

snakes

Source

snakes.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: defgenerator NAME ARGUMENTS &body BODY
Package

snakes

Source

snakes.lisp (file)

Macro: do-generator (VAR &rest VARS-AND-GENERATOR) &body BODY

Steps through the specified generator, binding the value it returns to var, then executing the body for each step. If multiple variables are specified and the generator returns multiple values, the extra values will be bound to the extra variables.

Package

snakes

Source

snakes.lisp (file)

Macro: do-generator-value-list (VAR GENERATOR) &body BODY

Like do-generator, except all values emitted by the generator are placed in a list under the user defined variable.

Package

snakes

Source

snakes.lisp (file)

Macro: do-generators GENSPECS &body BODY

Simultaneously iterate through multiple generators at once. By default
do-generators terminates when the shortest generator ends, but individual
generators can be padded out with the :fill-value keyword. Do-generators can
also iterate over lists in parallel with generators. To use lists, start the genspec with the :list keyword. Eg: (do-generators ((a (repeat 2))
(:list b ’(4 5 6))
(c (list->generator ’(8 9)) :fill-value 30))
(print (* a (+ b c))))
24
28
72
NIL

Package

snakes

Source

do-generators.lisp (file)

Macro: gen-lambda PARAMS &body REST

Version of lambda that wraps the anonymous function in an instance of the basic-generator class. This allows the lambda to be identified as a generator by its type. Basic-generator objects are derived from funcallable-standard-class, therefore they can be called as functions.

Package

snakes

Source

snakes.lisp (file)

Macro: gen-lambda-with-sticky-stop &rest REST
Package

snakes

Source

snakes.lisp (file)

Macro: with-yield &body BODY
Package

snakes

Source

snakes.lisp (file)

Macro: yield-all GENERATOR

Walks through generator, re-yielding all of the items in it. Only meant for use inside of a defgenerator or with-yield block.

Package

snakes

Source

snakes.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: chain &rest GENERATORS
Package

snakes

Source

itertools.lisp (file)

Function: combinations LIST R
Package

snakes

Source

itertools.lisp (file)

Function: combinations-with-replacement LIST R
Package

snakes

Source

itertools.lisp (file)

Function: compress DATA SELECTORS
Package

snakes

Source

itertools.lisp (file)

Function: consume N GEN &key FAIL-IF-SHORT

Takes N items from generator gen, returning nothing. If the generator contains less than n items, consume will empty the generator silently if fail-if-short is set to nil, otherwise it will raise an error.

Package

snakes

Source

snakes.lisp (file)

Function: cycle LIST-OR-GEN
Package

snakes

Source

itertools.lisp (file)

Function: dropwhile PREDICATE GENERATOR
Package

snakes

Source

itertools.lisp (file)

Function: enumerate GENERATOR
Package

snakes

Source

itertools.lisp (file)

Function: file->generator PATH

Given a path, will attempt to open the file specified and emit it line by line. Note: it will not close the file until the generator is exhausted.

Package

snakes

Source

snakes.lisp (file)

Function: function->generator SOURCE-FUNC PREDICATE

Returns a generator that repeatedly calls source-func, tests the result against the predicate function, terminates when the predicate tests false, otherwise yielding the result

Package

snakes

Source

snakes.lisp (file)

Function: generator->list GEN
Package

snakes

Source

snakes.lisp (file)

Function: groupby GENERATOR &key KEY COMP
Package

snakes

Source

itertools.lisp (file)

Function: icount N &optional STEP
Package

snakes

Source

itertools.lisp (file)

Function: ifilter PREDICATE GENERATOR
Package

snakes

Source

itertools.lisp (file)

Function: ifilter-false PREDICATE GENERATOR
Package

snakes

Source

itertools.lisp (file)

Function: imap FUNCTION &rest GENERATORS
Package

snakes

Source

itertools.lisp (file)

Function: islice GENERATOR STOP-OR-START &optional STOP STEP
Package

snakes

Source

itertools.lisp (file)

Function: izip &rest GENERATORS
Package

snakes

Source

itertools.lisp (file)

Function: izip-longest &rest GENERATORS-AND-FILL-VALUE
Package

snakes

Source

itertools.lisp (file)

Function: list->generator SOURCE
Package

snakes

Source

snakes.lisp (file)

Function: list->generator-with-tail SOURCE
Package

snakes

Source

snakes.lisp (file)

Function: mapc-generator FUNCTION GENERATOR
Package

snakes

Source

snakes.lisp (file)

Function: mapcar-generator FUNCTION GENERATOR
Package

snakes

Source

snakes.lisp (file)

Function: multi-gen &rest GENSPECS
Package

snakes

Source

do-generators.lisp (file)

Function: permutations LIST &optional R
Package

snakes

Source

itertools.lisp (file)

Function: product &rest LISTS
Package

snakes

Source

itertools.lisp (file)

Function: sequence->generator SEQ
Package

snakes

Source

snakes.lisp (file)

Function: starmap FUNCTION GENERATOR
Package

snakes

Source

itertools.lisp (file)

Function: take N GEN &key FAIL-IF-SHORT

Takes n items from generator gen, returning them as a list. If the generator contains less than n items, take will return what is available if fail-if-short is set to nil, otherwise it will raise an error.

Package

snakes

Source

snakes.lisp (file)

Function: takewhile PREDICATE GENERATOR
Package

snakes

Source

itertools.lisp (file)

Function: tee GENERATOR &optional N

Creates independent copies of generator, returned as values. If the child generators are consumed at different times, tee will store all of the items from the least consumed child generator through to the most. It can, if used incautiously, require considerable memory.

Note also that this implementation of tee does not create independent copies of the parent items. Modifying items from a child generator and tampering with the parent generator have undefined consequences.

Package

snakes

Source

itertools.lisp (file)

Function: value-func->generator SOURCE

Converts to a generator that sort of function which uses the second value as
a completion signal. Will keep emitting the first return value of the source function until the second value is a nil.

Package

snakes

Source

snakes.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Generic functions

Generic Function: generatorp OBJ
Package

snakes

Source

snakes.lisp (file)

Methods
Method: generatorp (OBJ basic-generator)
Method: generatorp OBJ

Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Classes

Class: basic-generator ()
Package

snakes

Source

snakes.lisp (file)

Direct superclasses

funcallable-standard-object (class)

Direct methods
  • generatorp (method)
  • initialize-instance (method)

Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Macros

Macro: clause-for-in-generator-1 &key (FOR VAR) (IN-GENERATOR GEN) GENERATE

Iterate through a snakes generator

Package

snakes

Source

iterate.lisp (file)

Macro: if-generator (VAR GEN) TRUE-CLAUSE &optional FALSE-CLAUSE

Pulls a single iteration out of gen. If a single var is specified, it places all the values from the iteration in a list under var. If var is a list, destructures values into the vars in the list. If the generator has stopped, evaluates false-clause, otherwise evaluates true-clause.

Package

snakes

Source

snakes.lisp (file)

Macro: sticky-stop-lambda PARAMS &body BODY

Once a generator function has sent a generator-stop symbol, it should continue to do so every time it is called. This macro helps with obeying that rule.

Package

snakes

Source

snakes.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: append! LST OBJ
Package

snakes

Source

itertools.lisp (file)

Function: bind-clause DATAVAR VARNAMES BODY
Package

snakes

Source

do-generators.lisp (file)

Function: create-values-handler ()

Returns a function to transform ready-to-be-yielded values according to *snakes-multi-mode*. This should be set up at generator creation time, not at consumption time, so that generators in a chain can be set individually.

Package

snakes

Source

snakes.lisp (file)

Function: extract-keywords KEYWORDS ALIST &optional STACK
Package

snakes

Source

util.lisp (file)

Function: fill-info FILLSPEC
Package

snakes

Source

do-generators.lisp (file)

Function: get-generator G
Package

snakes

Source

do-generators.lisp (file)

Function: get-nextval-func GENSPEC
Package

snakes

Source

do-generators.lisp (file)

Function: last-car LIST
Package

snakes

Source

util.lisp (file)

Function: next-generator-value GEN
Package

snakes

Source

do-generators.lisp (file)

Function: next-generator-value-filled FILL

Returns a closure that acts like next-generator-value, but returns fill when the generator runs out. The :filled keyword instead of T in the first value slot still evaluates as true, but indicates that the generator has ended.

Package

snakes

Source

do-generators.lisp (file)

Function: proc-list-spec SPEC
Package

snakes

Source

do-generators.lisp (file)

Function: process-genspecs GENSPECS
Package

snakes

Source

do-generators.lisp (file)

Function: stream->generator STREAM

Emits stream line at a time as a generator.

Package

snakes

Source

snakes.lisp (file)

Function: xsubseq SEQUENCE START END &key TYPE

Returns sequence with start->end chopped out of it

Package

snakes

Source

util.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Conditions

Condition: insufficient-items ()

Generator has run out of items before expected.

Package

snakes

Source

snakes.lisp (file)

Direct superclasses

snakes-error (condition)

Condition: snakes-error ()
Package

snakes

Source

snakes.lisp (file)

Direct superclasses

error (condition)

Direct subclasses

insufficient-items (condition)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, snakes.asd: The snakes<dot>asd file
File, Lisp, snakes/do-generators.lisp: The snakes/do-generators<dot>lisp file
File, Lisp, snakes/iterate.lisp: The snakes/iterate<dot>lisp file
File, Lisp, snakes/itertools.lisp: The snakes/itertools<dot>lisp file
File, Lisp, snakes/package.lisp: The snakes/package<dot>lisp file
File, Lisp, snakes/snakes.lisp: The snakes/snakes<dot>lisp file
File, Lisp, snakes/util.lisp: The snakes/util<dot>lisp file

L
Lisp File, snakes.asd: The snakes<dot>asd file
Lisp File, snakes/do-generators.lisp: The snakes/do-generators<dot>lisp file
Lisp File, snakes/iterate.lisp: The snakes/iterate<dot>lisp file
Lisp File, snakes/itertools.lisp: The snakes/itertools<dot>lisp file
Lisp File, snakes/package.lisp: The snakes/package<dot>lisp file
Lisp File, snakes/snakes.lisp: The snakes/snakes<dot>lisp file
Lisp File, snakes/util.lisp: The snakes/util<dot>lisp file

S
snakes.asd: The snakes<dot>asd file
snakes/do-generators.lisp: The snakes/do-generators<dot>lisp file
snakes/iterate.lisp: The snakes/iterate<dot>lisp file
snakes/itertools.lisp: The snakes/itertools<dot>lisp file
snakes/package.lisp: The snakes/package<dot>lisp file
snakes/snakes.lisp: The snakes/snakes<dot>lisp file
snakes/util.lisp: The snakes/util<dot>lisp file

Jump to:   F   L   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   A   B   C   D   E   F   G   I   L   M   N   P   S   T   V   W   X   Y  
Index Entry  Section

A
append!: Internal functions

B
bind-clause: Internal functions

C
chain: Exported functions
clause-for-in-generator-1: Internal macros
combinations: Exported functions
combinations-with-replacement: Exported functions
compress: Exported functions
consume: Exported functions
create-values-handler: Internal functions
cycle: Exported functions

D
defgenerator: Exported macros
do-generator: Exported macros
do-generator-value-list: Exported macros
do-generators: Exported macros
dropwhile: Exported functions

E
enumerate: Exported functions
extract-keywords: Internal functions

F
file->generator: Exported functions
fill-info: Internal functions
Function, append!: Internal functions
Function, bind-clause: Internal functions
Function, chain: Exported functions
Function, combinations: Exported functions
Function, combinations-with-replacement: Exported functions
Function, compress: Exported functions
Function, consume: Exported functions
Function, create-values-handler: Internal functions
Function, cycle: Exported functions
Function, dropwhile: Exported functions
Function, enumerate: Exported functions
Function, extract-keywords: Internal functions
Function, file->generator: Exported functions
Function, fill-info: Internal functions
Function, function->generator: Exported functions
Function, generator->list: Exported functions
Function, get-generator: Internal functions
Function, get-nextval-func: Internal functions
Function, groupby: Exported functions
Function, icount: Exported functions
Function, ifilter: Exported functions
Function, ifilter-false: Exported functions
Function, imap: Exported functions
Function, islice: Exported functions
Function, izip: Exported functions
Function, izip-longest: Exported functions
Function, last-car: Internal functions
Function, list->generator: Exported functions
Function, list->generator-with-tail: Exported functions
Function, mapc-generator: Exported functions
Function, mapcar-generator: Exported functions
Function, multi-gen: Exported functions
Function, next-generator-value: Internal functions
Function, next-generator-value-filled: Internal functions
Function, permutations: Exported functions
Function, proc-list-spec: Internal functions
Function, process-genspecs: Internal functions
Function, product: Exported functions
Function, sequence->generator: Exported functions
Function, starmap: Exported functions
Function, stream->generator: Internal functions
Function, take: Exported functions
Function, takewhile: Exported functions
Function, tee: Exported functions
Function, value-func->generator: Exported functions
Function, xsubseq: Internal functions
function->generator: Exported functions

G
gen-lambda: Exported macros
gen-lambda-with-sticky-stop: Exported macros
generator->list: Exported functions
generatorp: Exported generic functions
generatorp: Exported generic functions
generatorp: Exported generic functions
Generic Function, generatorp: Exported generic functions
get-generator: Internal functions
get-nextval-func: Internal functions
groupby: Exported functions

I
icount: Exported functions
if-generator: Internal macros
ifilter: Exported functions
ifilter-false: Exported functions
imap: Exported functions
islice: Exported functions
izip: Exported functions
izip-longest: Exported functions

L
last-car: Internal functions
list->generator: Exported functions
list->generator-with-tail: Exported functions

M
Macro, clause-for-in-generator-1: Internal macros
Macro, defgenerator: Exported macros
Macro, do-generator: Exported macros
Macro, do-generator-value-list: Exported macros
Macro, do-generators: Exported macros
Macro, gen-lambda: Exported macros
Macro, gen-lambda-with-sticky-stop: Exported macros
Macro, if-generator: Internal macros
Macro, sticky-stop-lambda: Internal macros
Macro, with-yield: Exported macros
Macro, yield-all: Exported macros
mapc-generator: Exported functions
mapcar-generator: Exported functions
Method, generatorp: Exported generic functions
Method, generatorp: Exported generic functions
multi-gen: Exported functions

N
next-generator-value: Internal functions
next-generator-value-filled: Internal functions

P
permutations: Exported functions
proc-list-spec: Internal functions
process-genspecs: Internal functions
product: Exported functions

S
sequence->generator: Exported functions
starmap: Exported functions
sticky-stop-lambda: Internal macros
stream->generator: Internal functions

T
take: Exported functions
takewhile: Exported functions
tee: Exported functions

V
value-func->generator: Exported functions

W
with-yield: Exported macros

X
xsubseq: Internal functions

Y
yield-all: Exported macros

Jump to:   A   B   C   D   E   F   G   I   L   M   N   P   S   T   V   W   X   Y  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*snakes-multi-mode*: Exported special variables

S
Special Variable, *snakes-multi-mode*: Exported special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   I   P   S  
Index Entry  Section

B
basic-generator: Exported classes

C
Class, basic-generator: Exported classes
Condition, insufficient-items: Internal conditions
Condition, snakes-error: Internal conditions

I
insufficient-items: Internal conditions

P
Package, snakes: The snakes package

S
snakes: The snakes system
snakes: The snakes package
snakes-error: Internal conditions
System, snakes: The snakes system

Jump to:   B   C   I   P   S