API for seq - clojure-contrib v1.3 (in development)

by Stuart Sierra (and others)

Full namespace name: clojure.contrib.seq

Overview

Sequence utilities for Clojure

Public Variables and Functions



fill-queue

function
Usage: (fill-queue filler-func & optseq)
filler-func will be called in another thread with a single arg
'fill'.  filler-func may call fill repeatedly with one arg each
time which will be pushed onto a queue, blocking if needed until
this is possible.  fill-queue will return a lazy seq of the values
filler-func has pushed onto the queue, blocking if needed until each
next element becomes available.  filler-func's return value is ignored.
Source


find-first

function
Usage: (find-first pred coll)
Returns the first item of coll for which (pred item) returns logical true.
Consumes sequences up to the first match, will consume the entire sequence
and return nil if no match is found.
Source


indexed

function
Usage: (indexed s)
Returns a lazy sequence of [index, item] pairs, where items come
from 's' and indexes count up from zero.

(indexed '(a b c d))  =>  ([0 a] [1 b] [2 c] [3 d])
Source


positions

function
Usage: (positions pred coll)
Returns a lazy sequence containing the positions at which pred
is true for items in coll.
Source


rec-cat

macro
Usage: (rec-cat binding-name & exprs)
Similar to lazy-cat but binds the resulting sequence to the supplied 
binding-name, allowing for recursive expressions.
Source


rec-seq

macro
Usage: (rec-seq binding-name & body)
Similar to lazy-seq but binds the resulting seq to the supplied 
binding-name, allowing for recursive expressions.
Source


rotations

function
Usage: (rotations x)
Returns a lazy seq of all rotations of a seq
Source


separate

function
Usage: (separate f s)
Returns a vector:
[ (filter f s), (filter (complement f) s) ]
Source
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.