The lazy Reference Manual

Table of Contents

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

The lazy Reference Manual

This is the lazy Reference Manual, version 1.0, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Mon Jul 29 15:58:50 2019 GMT+0.


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

1 Introduction

Lazy Forms for Common Lisp

This is a simple lazy form evaluation package for Common Lisp.

Quickstart

A lazy form (or thunk) is simply a function wrapping a body of code that will only every be executed once, and the result remembered for future use.

To create a lazy form use the lazy macro:

(lazy &body form)  ;=> THUNK

Let's try it:

CL-USER > (lazy (+ 1 2))
#<THUNK UNREALIZED>

Let's resolve it with the lazy-value function:

CL-USER > (lazy-value *)
3

Try it again, but with something that has side-effects:

CL-USER > (lazy (print 'hi) (+ 1 2))
#<THUNK UNREALIZED>

Resolve it and get the value:

CL-USER > (lazy-value *)
HI
3

Get the value again, and notice that the thunk isn't executed a second time:

CL-USER > (lazy-value **)
3

That's it!


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 lazy

Author

Jeffrey Massung

License

Apache 2.0

Description

Lazy forms for Common Lisp.

Version

1.0

Source

lazy.asd (file)

Component

lazy.lisp (file)


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 lazy.asd

Location

lazy.asd

Systems

lazy (system)

Packages

lazy-asd


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

3.1.2 lazy/lazy.lisp

Parent

lazy (system)

Location

lazy.lisp

Packages

lazy

Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 lazy-asd

Source

lazy.asd

Use List

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

4.2 lazy

Source

lazy.lisp (file)

Use List

common-lisp

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 Macros

Macro: lazy &body FORM

Create a new lazy form that will evaluate later.

Package

lazy

Source

lazy.lisp (file)


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

5.1.2 Functions

Function: lazy-value THUNK

Get the value of a lazy form.

Package

lazy

Source

lazy.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Generic functions

Generic Function: thunk-realized-p THUNK
Package

lazy

Methods
Method: thunk-realized-p (THUNK thunk)

T if the thunk has been realized to a value.

Source

lazy.lisp (file)


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

5.2.2 Classes

Class: thunk ()

A form to be evaluated later.

Package

lazy

Source

lazy.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: form
Initargs

:form

Slot: value
Initargs

:value


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L  
Index Entry  Section

F
File, Lisp, lazy.asd: The lazy<dot>asd file
File, Lisp, lazy/lazy.lisp: The lazy/lazy<dot>lisp file

L
lazy.asd: The lazy<dot>asd file
lazy/lazy.lisp: The lazy/lazy<dot>lisp file
Lisp File, lazy.asd: The lazy<dot>asd file
Lisp File, lazy/lazy.lisp: The lazy/lazy<dot>lisp file

Jump to:   F   L  

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

A.2 Functions

Jump to:   F   G   L   M   T  
Index Entry  Section

F
Function, lazy-value: Exported functions

G
Generic Function, thunk-realized-p: Internal generic functions

L
lazy: Exported macros
lazy-value: Exported functions

M
Macro, lazy: Exported macros
Method, thunk-realized-p: Internal generic functions

T
thunk-realized-p: Internal generic functions
thunk-realized-p: Internal generic functions

Jump to:   F   G   L   M   T  

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

A.3 Variables

Jump to:   F   S   V  
Index Entry  Section

F
form: Internal classes

S
Slot, form: Internal classes
Slot, value: Internal classes

V
value: Internal classes

Jump to:   F   S   V  

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

A.4 Data types

Jump to:   C   L   P   S   T  
Index Entry  Section

C
Class, thunk: Internal classes

L
lazy: The lazy system
lazy: The lazy package
lazy-asd: The lazy-asd package

P
Package, lazy: The lazy package
Package, lazy-asd: The lazy-asd package

S
System, lazy: The lazy system

T
thunk: Internal classes

Jump to:   C   L   P   S   T