The algebraic-data-library Reference Manual

This is the algebraic-data-library Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sat Dec 03 19:22:32 2022 GMT+0.

Table of Contents


1 Systems

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


1.1 algebraic-data-library

A library of common algebraic data types.

Author

Robert Smith <>

License

BSD 3-clause

Dependency

cl-algebraic-data-type (system).

Source

algebraic-data-library.asd.

Child Components

2 Files

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


2.1 Lisp


2.1.1 algebraic-data-library/algebraic-data-library.asd

Source

algebraic-data-library.asd.

Parent Component

algebraic-data-library (system).

ASDF Systems

algebraic-data-library.


2.1.2 algebraic-data-library/package.lisp

Source

algebraic-data-library.asd.

Parent Component

algebraic-data-library (system).

Packages

algebraic-data-library.


2.1.3 algebraic-data-library/generics.lisp

Dependency

package.lisp (file).

Source

algebraic-data-library.asd.

Parent Component

algebraic-data-library (system).

Public Interface
  • >> (generic function).
  • >>= (generic function).
  • fmap (generic function).
  • fmap* (function).
  • mlet (macro).
  • wrap (generic function).

2.1.4 algebraic-data-library/unit.lisp

Dependency

generics.lisp (file).

Source

algebraic-data-library.asd.

Parent Component

algebraic-data-library (system).

Public Interface

2.1.5 algebraic-data-library/maybe.lisp

Dependency

unit.lisp (file).

Source

algebraic-data-library.asd.

Parent Component

algebraic-data-library (system).

Public Interface
Internals

just%0 (reader).


2.1.6 algebraic-data-library/either.lisp

Dependency

maybe.lisp (file).

Source

algebraic-data-library.asd.

Parent Component

algebraic-data-library (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 algebraic-data-library

Source

package.lisp.

Nickname

adl

Use List

common-lisp.

Public Interface
Internals

4 Definitions

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


4.1 Public Interface


4.1.1 Constants

Constant: nothing
Package

algebraic-data-library.

Source

maybe.lisp.

Constant: nul
Package

algebraic-data-library.

Source

unit.lisp.


4.1.2 Macros

Macro: mlet (bindings &body body)

Similar to Haskell’s ‘do’ notation, allows for ‘>>=’ to be chained together.

Package

algebraic-data-library.

Source

generics.lisp.


4.1.3 Ordinary functions

Function: fmap* (fun)

A curried version of FMAP: lift FUN to operate on functor types.

Package

algebraic-data-library.

Source

generics.lisp.

Function: just (%0)
Package

algebraic-data-library.

Source

maybe.lisp.

Function: just-or-else (maybe-val or-else)

Return the encapsulated value of a JUST, otherwise return OR-ELSE if MAYBE-VAL is NOTHING.

Package

algebraic-data-library.

Source

maybe.lisp.

Function: left (%0)
Package

algebraic-data-library.

Source

either.lisp.

Function: lookup (key hash-table)

A type-safe version of GETHASH. Look up the key KEY in the hash table HASH-TABLE.

Package

algebraic-data-library.

Source

maybe.lisp.

Function: mirror (either-val)
Package

algebraic-data-library.

Source

either.lisp.

Function: right (%0)
Package

algebraic-data-library.

Source

either.lisp.


4.1.4 Generic functions

Generic Function: >> (a b)

Compute A and then B, discarding A.

Package

algebraic-data-library.

Source

generics.lisp.

Methods
Method: >> (a b)
Generic Function: >>= (val f)

Send/compose the result of VAL to F.

Package

algebraic-data-library.

Source

generics.lisp.

Methods
Method: >>= ((val maybe) f)
Source

maybe.lisp.

Generic Function: fmap (fun val)

A way to lift FUN into a container-like value VAL.

Package

algebraic-data-library.

Source

generics.lisp.

Methods
Method: fmap ((f function) (val either))
Source

either.lisp.

Method: fmap ((f function) (val maybe))
Source

maybe.lisp.

Generic Function: wrap (type value)

Lift VALUE to type TYPE.

Package

algebraic-data-library.

Source

generics.lisp.

Methods
Method: wrap ((x (eql algebraic-data-library:maybe)) value)
Source

maybe.lisp.


4.1.5 Standalone methods

Method: make-load-form ((object-0 right) &optional environment-3)
Source

either.lisp.

Method: make-load-form ((object-0 nothing) &optional environment-3)
Source

maybe.lisp.

Method: make-load-form ((object-0 nul) &optional environment-3)
Source

unit.lisp.

Method: make-load-form ((object-0 left) &optional environment-3)
Source

either.lisp.

Method: make-load-form ((object-0 just) &optional environment-3)
Source

maybe.lisp.

Method: print-object ((object right) stream)
Source

either.lisp.

Method: print-object ((object nothing) stream)
Source

maybe.lisp.

Method: print-object ((object nul) stream)
Source

unit.lisp.

Method: print-object ((object left) stream)
Source

either.lisp.

Method: print-object ((object just) stream)
Source

maybe.lisp.


4.1.6 Structures

Structure: either
Package

algebraic-data-library.

Source

either.lisp.

Direct superclasses

algebraic-data-type.

Direct subclasses
Direct methods

fmap.

Structure: just
Package

algebraic-data-library.

Source

maybe.lisp.

Direct superclasses

maybe.

Direct methods
Direct slots
Slot: %0
Package

cl-algebraic-data-type.

Initform

(error "unspecified field.")

Readers

just%0.

Writers

This slot is read-only.

Structure: left
Package

algebraic-data-library.

Source

either.lisp.

Direct superclasses

either.

Direct methods
Direct slots
Slot: %0
Package

cl-algebraic-data-type.

Initform

(error "unspecified field.")

Readers

left%0.

Writers

This slot is read-only.

Structure: maybe
Package

algebraic-data-library.

Source

maybe.lisp.

Direct superclasses

algebraic-data-type.

Direct subclasses
Direct methods
Structure: nothing
Package

algebraic-data-library.

Source

maybe.lisp.

Direct superclasses

maybe.

Direct methods
Structure: nul
Package

algebraic-data-library.

Source

unit.lisp.

Direct superclasses

unit.

Direct methods
Structure: right
Package

algebraic-data-library.

Source

either.lisp.

Direct superclasses

either.

Direct methods
Direct slots
Slot: %0
Package

cl-algebraic-data-type.

Initform

(error "unspecified field.")

Readers

right%0.

Writers

This slot is read-only.

Structure: unit
Package

algebraic-data-library.

Source

unit.lisp.

Direct superclasses

algebraic-data-type.

Direct subclasses

nul.


4.2 Internals


4.2.1 Ordinary functions

Reader: just%0 (instance)
Package

algebraic-data-library.

Source

maybe.lisp.

Target Slot

%0.

Reader: left%0 (instance)
Package

algebraic-data-library.

Source

either.lisp.

Target Slot

%0.

Reader: right%0 (instance)
Package

algebraic-data-library.

Source

either.lisp.

Target Slot

%0.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   >  
F   G   J   L   M   P   R   W  
Index Entry  Section

>
>>: Public generic functions
>>: Public generic functions
>>=: Public generic functions
>>=: Public generic functions

F
fmap: Public generic functions
fmap: Public generic functions
fmap: Public generic functions
fmap*: Public ordinary functions
Function, fmap*: Public ordinary functions
Function, just: Public ordinary functions
Function, just%0: Private ordinary functions
Function, just-or-else: Public ordinary functions
Function, left: Public ordinary functions
Function, left%0: Private ordinary functions
Function, lookup: Public ordinary functions
Function, mirror: Public ordinary functions
Function, right: Public ordinary functions
Function, right%0: Private ordinary functions

G
Generic Function, >>: Public generic functions
Generic Function, >>=: Public generic functions
Generic Function, fmap: Public generic functions
Generic Function, wrap: Public generic functions

J
just: Public ordinary functions
just%0: Private ordinary functions
just-or-else: Public ordinary functions

L
left: Public ordinary functions
left%0: Private ordinary functions
lookup: Public ordinary functions

M
Macro, mlet: Public macros
make-load-form: Public standalone methods
make-load-form: Public standalone methods
make-load-form: Public standalone methods
make-load-form: Public standalone methods
make-load-form: Public standalone methods
Method, >>: Public generic functions
Method, >>=: Public generic functions
Method, fmap: Public generic functions
Method, fmap: Public generic functions
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, wrap: Public generic functions
mirror: Public ordinary functions
mlet: Public macros

P
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods

R
right: Public ordinary functions
right%0: Private ordinary functions

W
wrap: Public generic functions
wrap: Public generic functions


A.4 Data types

Jump to:   A   E   F   G   J   L   M   N   P   R   S   U  
Index Entry  Section

A
algebraic-data-library: The algebraic-data-library system
algebraic-data-library: The algebraic-data-library package
algebraic-data-library.asd: The algebraic-data-library/algebraic-data-library․asd file

E
either: Public structures
either.lisp: The algebraic-data-library/either․lisp file

F
File, algebraic-data-library.asd: The algebraic-data-library/algebraic-data-library․asd file
File, either.lisp: The algebraic-data-library/either․lisp file
File, generics.lisp: The algebraic-data-library/generics․lisp file
File, maybe.lisp: The algebraic-data-library/maybe․lisp file
File, package.lisp: The algebraic-data-library/package․lisp file
File, unit.lisp: The algebraic-data-library/unit․lisp file

G
generics.lisp: The algebraic-data-library/generics․lisp file

J
just: Public structures

L
left: Public structures

M
maybe: Public structures
maybe.lisp: The algebraic-data-library/maybe․lisp file

N
nothing: Public structures
nul: Public structures

P
Package, algebraic-data-library: The algebraic-data-library package
package.lisp: The algebraic-data-library/package․lisp file

R
right: Public structures

S
Structure, either: Public structures
Structure, just: Public structures
Structure, left: Public structures
Structure, maybe: Public structures
Structure, nothing: Public structures
Structure, nul: Public structures
Structure, right: Public structures
Structure, unit: Public structures
System, algebraic-data-library: The algebraic-data-library system

U
unit: Public structures
unit.lisp: The algebraic-data-library/unit․lisp file