The native-lazy-seq Reference Manual

This is the native-lazy-seq Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 17:24:39 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 native-lazy-seq

Lazy sequence using user-extensible sequence protocol.

Author

Qiantan Hong <>

License

GPLv3.0+

Dependencies
  • trivial-package-local-nicknames (system).
  • trivial-extensible-sequences (system).
  • iterate (system).
  • serapeum (system).
Source

native-lazy-seq.asd.

Child Component

native-lazy-seq.lisp (file).


3 Files

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


3.1 Lisp


3.1.1 native-lazy-seq/native-lazy-seq.asd

Source

native-lazy-seq.asd.

Parent Component

native-lazy-seq (system).

ASDF Systems

native-lazy-seq.


3.1.2 native-lazy-seq/native-lazy-seq.lisp

Source

native-lazy-seq.asd.

Parent Component

native-lazy-seq (system).

Packages

native-lazy-seq.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 native-lazy-seq

Source

native-lazy-seq.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Macros

Macro: lazy-seq (() &body body)

Construct a lazy sequence.

BODY is evaluated each time we want to generate a new element in the lazy sequence. It should result in two values ELEMENT, PRESENT-P. If there are element to be generated, ELEMENT should be the next ELEMENT and PRESENT-P should be non-nil. Otherwise, PRESENT-P should be nil.

Package

native-lazy-seq.

Source

native-lazy-seq.lisp.

Macro: with-iterators ((element next endp) seq &body body)
Package

native-lazy-seq.

Source

native-lazy-seq.lisp.


5.1.2 Generic functions

Generic Reader: generator (object)
Package

native-lazy-seq.

Methods
Reader Method: generator ((lazy-seq lazy-seq))

automatically generated reader method

Source

native-lazy-seq.lisp.

Target Slot

generator.

Generic Writer: (setf generator) (object)
Package

native-lazy-seq.

Methods
Writer Method: (setf generator) ((lazy-seq lazy-seq))

automatically generated writer method

Source

native-lazy-seq.lisp.

Target Slot

generator.


5.1.3 Standalone methods

Method: elt ((s lazy-seq) i)
Package

sb-sequence.

Source

native-lazy-seq.lisp.

Method: iterator-endp ((s lazy-seq) i limit from-end)
Package

sb-sequence.

Source

native-lazy-seq.lisp.

Method: length ((s lazy-seq))
Package

sb-sequence.

Source

native-lazy-seq.lisp.

Method: make-sequence-like ((s lazy-seq) length &key initial-element initial-contents)
Package

sb-sequence.

Source

native-lazy-seq.lisp.

Method: make-simple-sequence-iterator ((s lazy-seq) &key from-end start end)
Package

sb-sequence.

Source

native-lazy-seq.lisp.

Method: remove-if (predicate (s lazy-seq) &key from-end start end count key)
Package

sb-sequence.

Source

native-lazy-seq.lisp.

Method: remove-if-not (predicate (s lazy-seq) &key from-end start end count key)
Package

sb-sequence.

Source

native-lazy-seq.lisp.

Method: subseq ((s lazy-seq) start &optional end)
Package

sb-sequence.

Source

native-lazy-seq.lisp.


5.1.4 Classes

Class: lazy-seq

Lazy sequence class.
Accept a single initialization argument :GENERATOR, which must be a function.

The function specifies how to lazily generate elements in the sequence. When it is called with no argument, it must return two values ELEMENT, PRESENT-P. If there are element to be generated, ELEMENT should be the next ELEMENT and PRESENT-P should be non-nil. Otherwise, PRESENT-P should be nil.

Package

native-lazy-seq.

Source

native-lazy-seq.lisp.

Direct superclasses

sequence.

Direct methods
Direct slots
Slot: contents
Initform

(serapeum:vect)

Readers

contents.

Writers

(setf contents).

Slot: generator
Initargs

:generator

Readers

generator.

Writers

(setf generator).


5.2 Internals


5.2.1 Ordinary functions

Function: call-with-iterators (seq thunk)
Package

native-lazy-seq.

Source

native-lazy-seq.lisp.

Function: generate-element (s)

Try to generate one more element in lazy sequence S. Return true if such a element is successfully generated.

Package

native-lazy-seq.

Source

native-lazy-seq.lisp.


5.2.2 Generic functions

Generic Reader: contents (object)
Package

native-lazy-seq.

Methods
Reader Method: contents ((lazy-seq lazy-seq))

automatically generated reader method

Source

native-lazy-seq.lisp.

Target Slot

contents.

Generic Writer: (setf contents) (object)
Package

native-lazy-seq.

Methods
Writer Method: (setf contents) ((lazy-seq lazy-seq))

automatically generated writer method

Source

native-lazy-seq.lisp.

Target Slot

contents.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   E   F   G   I   L   M   R   S   W  
Index Entry  Section

(
(setf contents): Private generic functions
(setf contents): Private generic functions
(setf generator): Public generic functions
(setf generator): Public generic functions

C
call-with-iterators: Private ordinary functions
contents: Private generic functions
contents: Private generic functions

E
elt: Public standalone methods

F
Function, call-with-iterators: Private ordinary functions
Function, generate-element: Private ordinary functions

G
generate-element: Private ordinary functions
generator: Public generic functions
generator: Public generic functions
Generic Function, (setf contents): Private generic functions
Generic Function, (setf generator): Public generic functions
Generic Function, contents: Private generic functions
Generic Function, generator: Public generic functions

I
iterator-endp: Public standalone methods

L
lazy-seq: Public macros
length: Public standalone methods

M
Macro, lazy-seq: Public macros
Macro, with-iterators: Public macros
make-sequence-like: Public standalone methods
make-simple-sequence-iterator: Public standalone methods
Method, (setf contents): Private generic functions
Method, (setf generator): Public generic functions
Method, contents: Private generic functions
Method, elt: Public standalone methods
Method, generator: Public generic functions
Method, iterator-endp: Public standalone methods
Method, length: Public standalone methods
Method, make-sequence-like: Public standalone methods
Method, make-simple-sequence-iterator: Public standalone methods
Method, remove-if: Public standalone methods
Method, remove-if-not: Public standalone methods
Method, subseq: Public standalone methods

R
remove-if: Public standalone methods
remove-if-not: Public standalone methods

S
subseq: Public standalone methods

W
with-iterators: Public macros


A.3 Variables

Jump to:   C   G   S  
Index Entry  Section

C
contents: Public classes

G
generator: Public classes

S
Slot, contents: Public classes
Slot, generator: Public classes