The sequence-utilities Module¶
Overview¶
The sequence-utilities module implements some useful methods on sequences.
Reference¶
TODO: These docs are just an auto-generated skeleton so far. https://github.com/dylan-lang/collection-extensions/issues/2
- alist-copy Function¶
- Signature:
alist-copy (alist #key key datum cons) => (new-alist)
- Parameters:
alist – An instance of
<sequence>
.key (#key) – An instance of
<object>
.datum (#key) – An instance of
<object>
.cons (#key) – An instance of
<object>
.
- Values:
new-alist – An instance of
<sequence>
.
- alist-delete Function¶
- Signature:
alist-delete (elt alist #key key test) => (#rest results)
- Parameters:
elt – An instance of
<object>
.alist – An instance of
<sequence>
.key (#key) – An instance of
<object>
.test (#key) – An instance of
<object>
.
- Values:
#rest results – An instance of
<object>
.
- apair Function¶
- Signature:
apair (key datum aseq #key cons add) => (new-aseq)
- Parameters:
key – An instance of
<object>
.datum – An instance of
<object>
.aseq – An instance of
<sequence>
.cons (#key) – An instance of
<object>
.add (#key) – An instance of
<object>
.
- Values:
new-aseq – An instance of
<sequence>
.
- assoc Function¶
- Signature:
assoc (elt seq #key key test) => (#rest results)
- Parameters:
elt – An instance of
<object>
.seq – An instance of
<sequence>
.key (#key) – An instance of
<object>
.test (#key) – An instance of
<object>
.
- Values:
#rest results – An instance of
<object>
.
- choose-map Generic function¶
- choose-map(<function>, <function>, <sequence>) Method¶
- choose-map(<function>, <function>, <list>) Method¶
- concatenate-map Generic function¶
- concatenate-map(<function>, <sequence>) Method¶
- concatenate-map(<function>, <list>) Method¶
- drop Open Generic function¶
- drop(<sequence>, <integer>) Method¶
- find Generic function¶
- Signature:
find (pred seq #key failure) => (#rest results)
- Parameters:
pred – An instance of
<function>
.seq – An instance of
<sequence>
.failure (#key) – An instance of
<object>
.
- Values:
#rest results – An instance of
<object>
.
- find-tail Generic function¶
- find-tail(<function>, <sequence>) Method¶
- find-tail(<function>, <pair>) Method¶
- find-tail(<function>, <empty-list>) Method¶
- foldl Function¶
- Signature:
foldl (cons nil lst) => (#rest results)
- Parameters:
cons – An instance of
<function>
.nil – An instance of
<object>
.lst – An instance of
<list>
.
- Values:
#rest results – An instance of
<object>
.
- foldr Function¶
- Signature:
foldr (cons nil lst) => (#rest results)
- Parameters:
cons – An instance of
<function>
.nil – An instance of
<object>
.lst – An instance of
<list>
.
- Values:
#rest results – An instance of
<object>
.
- heads Function¶
- index Generic function¶
- Signature:
index (elt seq #key test failure) => (index)
- Parameters:
elt – An instance of
<object>
.seq – An instance of
<sequence>
.test (#key) – An instance of
<object>
.failure (#key) – An instance of
<object>
.
- Values:
index – An instance of
<object>
.
- last-pair Function¶
- list* Function¶
- list? Generic function¶
- list?(<list>) Method¶
- list?(<object>) Method¶
- null? Generic function¶
- null?(<empty-list>) Method¶
- null?(<object>) Method¶
- pair-do Function¶
- Signature:
pair-do (func lst #rest lists) => (false)
- Parameters:
func – An instance of
<function>
.lst – An instance of
<list>
.lists (#rest) – An instance of
<object>
.
- Values:
false – An instance of
<boolean>
.
- pair-foldl Function¶
- Signature:
pair-foldl (cons nil lst) => (#rest results)
- Parameters:
cons – An instance of
<function>
.nil – An instance of
<object>
.lst – An instance of
<list>
.
- Values:
#rest results – An instance of
<object>
.
- pair-foldr Function¶
- Signature:
pair-foldr (cons nil lst) => (#rest results)
- Parameters:
cons – An instance of
<function>
.nil – An instance of
<object>
.lst – An instance of
<list>
.
- Values:
#rest results – An instance of
<object>
.
- pair? Generic function¶
- pair?(<pair>) Method¶
- pair?(<object>) Method¶
- partition Function¶
- Signature:
partition (pred seq) => (winners losers)
- Parameters:
pred – An instance of
<function>
.seq – An instance of
<sequence>
.
- Values:
- pop! Macro¶
- precedes? Generic function¶
- Signature:
precedes? (elt-1 elt-2 seq #key test not-found) => (precedes?)
- Parameters:
elt-1 – An instance of
<object>
.elt-2 – An instance of
<object>
.seq – An instance of
<sequence>
.test (#key) – An instance of
<object>
.not-found (#key) – An instance of
<object>
.
- Values:
precedes? – An instance of
<boolean>
.
- push! Macro¶
- reduce-l Function¶
- Signature:
reduce-l (cons nil lst) => (#rest results)
- Parameters:
cons – An instance of
<function>
.nil – An instance of
<object>
.lst – An instance of
<list>
.
- Values:
#rest results – An instance of
<object>
.
- reduce-r Function¶
- Signature:
reduce-r (cons nil lst) => (#rest results)
- Parameters:
cons – An instance of
<function>
.nil – An instance of
<object>
.lst – An instance of
<list>
.
- Values:
#rest results – An instance of
<object>
.
- reverse-append Open Generic function¶
- Signature:
reverse-append (reversed-head tail) => (new-sequence)
- Parameters:
reversed-head – An instance of
<sequence>
.tail – An instance of
<sequence>
.
- Values:
new-sequence – An instance of
<sequence>
.
- reverse-append(<sequence>, <sequence>) Method¶
- reverse-append(<list>, <list>) Method¶
- satisfies Generic function¶
- Signature:
satisfies (pred seq #key failure) => (index)
- Parameters:
pred – An instance of
<function>
.seq – An instance of
<sequence>
.failure (#key) – An instance of
<object>
.
- Values:
index – An instance of
<object>
.
- tabulate Function¶
- Signature:
tabulate (length func #key type) => (#rest results)
- Parameters:
length – An instance of
<integer>
.func – An instance of
<function>
.type (#key) – An instance of
<object>
.
- Values:
#rest results – An instance of
<object>
.
- tails Function¶
- take Open Generic function¶
- take(<sequence>, <integer>) Method¶
- unfold Function¶
- Signature:
unfold (pred f g seed) => (new-list)
- Parameters:
pred – An instance of
<function>
.f – An instance of
<function>
.g – An instance of
<function>
.seed – An instance of
<object>
.
- Values:
new-list – An instance of
<list>
.
- unfold/tail Function¶
- Signature:
unfold/tail (pred f g e seed) => (new-list)
- Parameters:
pred – An instance of
<function>
.f – An instance of
<function>
.g – An instance of
<function>
.e – An instance of
<function>
.seed – An instance of
<object>
.
- Values:
new-list – An instance of
<list>
.