The sequence-utilities Module ============================= .. current-library:: collection-extensions .. current-module:: sequence-utilities 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 .. function:: alist-copy :signature: alist-copy (alist #key key datum cons) => (new-alist) :parameter alist: An instance of :drm:``. :parameter #key key: An instance of :drm:``. :parameter #key datum: An instance of :drm:``. :parameter #key cons: An instance of :drm:``. :value new-alist: An instance of :drm:``. .. function:: alist-delete :signature: alist-delete (elt alist #key key test) => (#rest results) :parameter elt: An instance of :drm:``. :parameter alist: An instance of :drm:``. :parameter #key key: An instance of :drm:``. :parameter #key test: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. function:: apair :signature: apair (key datum aseq #key cons add) => (new-aseq) :parameter key: An instance of :drm:``. :parameter datum: An instance of :drm:``. :parameter aseq: An instance of :drm:``. :parameter #key cons: An instance of :drm:``. :parameter #key add: An instance of :drm:``. :value new-aseq: An instance of :drm:``. .. function:: assoc :signature: assoc (elt seq #key key test) => (#rest results) :parameter elt: An instance of :drm:``. :parameter seq: An instance of :drm:``. :parameter #key key: An instance of :drm:``. :parameter #key test: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. generic-function:: choose-map :signature: choose-map (pred func seq #rest seqs) => (#rest results) :parameter pred: An instance of :drm:``. :parameter func: An instance of :drm:``. :parameter seq: An instance of :drm:``. :parameter #rest seqs: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. method:: choose-map :specializer: , , .. method:: choose-map :specializer: , , .. generic-function:: concatenate-map :signature: concatenate-map (func seq #rest seqs) => (#rest results) :parameter func: An instance of :drm:``. :parameter seq: An instance of :drm:``. :parameter #rest seqs: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. method:: concatenate-map :specializer: , .. method:: concatenate-map :specializer: , .. generic-function:: drop :open: :signature: drop (collection k) => (#rest results) :parameter collection: An instance of :drm:``. :parameter k: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. method:: drop :specializer: , .. generic-function:: find :signature: find (pred seq #key failure) => (#rest results) :parameter pred: An instance of :drm:``. :parameter seq: An instance of :drm:``. :parameter #key failure: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. generic-function:: find-tail :signature: find-tail (pred seq) => (#rest results) :parameter pred: An instance of :drm:``. :parameter seq: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. method:: find-tail :specializer: , .. method:: find-tail :specializer: , .. method:: find-tail :specializer: , .. function:: foldl :signature: foldl (cons nil lst) => (#rest results) :parameter cons: An instance of :drm:``. :parameter nil: An instance of :drm:``. :parameter lst: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. function:: foldr :signature: foldr (cons nil lst) => (#rest results) :parameter cons: An instance of :drm:``. :parameter nil: An instance of :drm:``. :parameter lst: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. function:: heads :signature: heads (lists) => (new-list) :parameter lists: An instance of :drm:``. :value new-list: An instance of :drm:``. .. generic-function:: index :signature: index (elt seq #key test failure) => (index) :parameter elt: An instance of :drm:``. :parameter seq: An instance of :drm:``. :parameter #key test: An instance of :drm:``. :parameter #key failure: An instance of :drm:``. :value index: An instance of :drm:``. .. function:: last-pair :signature: last-pair (lst) => (last-pair) :parameter lst: An instance of :drm:``. :value last-pair: An instance of :drm:``. .. function:: list* :signature: list* (#rest rest) => (new-list) :parameter #rest rest: An instance of :drm:``. :value new-list: An instance of :drm:``. .. generic-function:: list? :signature: list? (arg) => (#rest results) :parameter arg: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. method:: list? :specializer: .. method:: list? :specializer: .. generic-function:: null? :signature: null? (arg) => (#rest results) :parameter arg: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. method:: null? :specializer: .. method:: null? :specializer: .. function:: pair-do :signature: pair-do (func lst #rest lists) => (false) :parameter func: An instance of :drm:``. :parameter lst: An instance of :drm:``. :parameter #rest lists: An instance of :drm:``. :value false: An instance of :drm:``. .. function:: pair-foldl :signature: pair-foldl (cons nil lst) => (#rest results) :parameter cons: An instance of :drm:``. :parameter nil: An instance of :drm:``. :parameter lst: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. function:: pair-foldr :signature: pair-foldr (cons nil lst) => (#rest results) :parameter cons: An instance of :drm:``. :parameter nil: An instance of :drm:``. :parameter lst: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. generic-function:: pair? :signature: pair? (arg) => (#rest results) :parameter arg: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. method:: pair? :specializer: .. method:: pair? :specializer: .. function:: partition :signature: partition (pred seq) => (winners losers) :parameter pred: An instance of :drm:``. :parameter seq: An instance of :drm:``. :value winners: An instance of :drm:``. :value losers: An instance of :drm:``. .. macro:: pop! .. generic-function:: precedes? :signature: precedes? (elt-1 elt-2 seq #key test not-found) => (precedes?) :parameter elt-1: An instance of :drm:``. :parameter elt-2: An instance of :drm:``. :parameter seq: An instance of :drm:``. :parameter #key test: An instance of :drm:``. :parameter #key not-found: An instance of :drm:``. :value precedes?: An instance of :drm:``. .. macro:: push! .. function:: reduce-l :signature: reduce-l (cons nil lst) => (#rest results) :parameter cons: An instance of :drm:``. :parameter nil: An instance of :drm:``. :parameter lst: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. function:: reduce-r :signature: reduce-r (cons nil lst) => (#rest results) :parameter cons: An instance of :drm:``. :parameter nil: An instance of :drm:``. :parameter lst: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. generic-function:: reverse-append :open: :signature: reverse-append (reversed-head tail) => (new-sequence) :parameter reversed-head: An instance of :drm:``. :parameter tail: An instance of :drm:``. :value new-sequence: An instance of :drm:``. .. method:: reverse-append :specializer: , .. method:: reverse-append :specializer: , .. generic-function:: satisfies :signature: satisfies (pred seq #key failure) => (index) :parameter pred: An instance of :drm:``. :parameter seq: An instance of :drm:``. :parameter #key failure: An instance of :drm:``. :value index: An instance of :drm:``. .. function:: tabulate :signature: tabulate (length func #key type) => (#rest results) :parameter length: An instance of :drm:``. :parameter func: An instance of :drm:``. :parameter #key type: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. function:: tails :signature: tails (lists) => (#rest results) :parameter lists: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. generic-function:: take :open: :signature: take (collection k) => (#rest results) :parameter collection: An instance of :drm:``. :parameter k: An instance of :drm:``. :value #rest results: An instance of :drm:``. .. method:: take :specializer: , .. function:: unfold :signature: unfold (pred f g seed) => (new-list) :parameter pred: An instance of :drm:``. :parameter f: An instance of :drm:``. :parameter g: An instance of :drm:``. :parameter seed: An instance of :drm:``. :value new-list: An instance of :drm:``. .. function:: unfold/tail :signature: unfold/tail (pred f g e seed) => (new-list) :parameter pred: An instance of :drm:``. :parameter f: An instance of :drm:``. :parameter g: An instance of :drm:``. :parameter e: An instance of :drm:``. :parameter seed: An instance of :drm:``. :value new-list: An instance of :drm:``. .. function:: xpair :signature: xpair (list elt) => (new-list) :parameter list: An instance of :drm:``. :parameter elt: An instance of :drm:``. :value new-list: An instance of :drm:``.