The trivial-continuation Reference Manual

Table of Contents

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

The trivial-continuation Reference Manual

This is the trivial-continuation Reference Manual, version 0.1.3, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Mon Jul 29 16:50:08 2019 GMT+0.


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

1 Introduction

Trivial Continuation Manual

[in package TRIVIAL-CONTINUATION]

pipeline status Quicklisp coverage report

Description

This library provides an implementation of function call continuation and combination.

Installing trivial-continuation

This project is available in the latest QuickLisp distribution, so installing it is reduced to calling:

(ql:quickload :trivial-continuation)

Working Example

(cc/define simple-continuation (seq)
  (if seq
      cc/create-return (car seq)
			#'(lambda () (simple-continuation (cdr seq)))
			:operation :combine)
      (cc/delegate)))

(let ((cont (combine-continuations (simple-continuation '(1 2 3 4))  
                                   (simple-continuation '(5 6 7 8)))))
  (format t \"~a\" (result cont))

  (setf cont (call-continuation cont))
  (format t \"~a\" (result cont)))

Exported Symbols

License Information

This library is released under the MIT License. Please refer to the LICENSE to get the full licensing text.

Contributing to this project

Please refer to the CONTRIBUTING document for more information.


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 trivial-continuation

Author

Eric Diethelm <ediethelm@yahoo.com>

License

MIT

Description

Provides an implementation of function call continuation and combination.

Version

0.1.3

Dependencies
Source

trivial-continuation.asd (file)

Components

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 trivial-continuation.asd

Location

trivial-continuation.asd

Systems

trivial-continuation (system)


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

3.1.2 trivial-continuation/package.lisp

Parent

trivial-continuation (system)

Location

package.lisp

Packages

trivial-continuation


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

3.1.3 trivial-continuation/trivial-continuation.lisp

Parent

trivial-continuation (system)

Location

trivial-continuation.lisp

Exported Definitions
Internal Definitions

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

3.1.4 trivial-continuation/documentation.lisp

Parent

trivial-continuation (system)

Location

documentation.lisp

Exported Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 trivial-continuation

trivial-continuation provides an implementation of function call continuation and combination.

Source

package.lisp (file)

Use List
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 Special variables

Special Variable: @trivial-continuation-contributing
Package

trivial-continuation

Source

documentation.lisp (file)

Special Variable: @trivial-continuation-description
Package

trivial-continuation

Source

documentation.lisp (file)

Special Variable: @trivial-continuation-example
Package

trivial-continuation

Source

documentation.lisp (file)

Special Variable: @trivial-continuation-exported
Package

trivial-continuation

Source

documentation.lisp (file)

Special Variable: @trivial-continuation-installing
Package

trivial-continuation

Source

documentation.lisp (file)

Special Variable: @trivial-continuation-license
Package

trivial-continuation

Source

documentation.lisp (file)

Special Variable: @trivial-continuation-manual
Package

trivial-continuation

Source

documentation.lisp (file)


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

5.1.2 Macros

Macro: cc/create-return VALUE CONTINUATION &key OPERATION NAMED-DEFINE

Create a new result to be returned from inside *CC/DEFINE*.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Macro: cc/define NAME (&rest ARGS) &body BODY

Define a function to serve as a continuation.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Macro: cc/define-lambda (&rest ARGS) &body BODY

Define a lambda to serve as a continuation.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Macro: cc/define-named-lambda NAME (&rest ARGS) &body BODY

Define a named lambda to serve as a continuation.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Macro: cc/delegate &key NAMED-DEFINE

Indicate that this does not carry any result, but instead a continuation should be called. Used inside of *CC/DEFINE*.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Macro: cc/return RESULT &key NAMED-DEFINE

Return the *RESULT* from inside of *CC/DEFINE*.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Macro: cc/terminate &key NAMED-DEFINE

Indicate that this result should be the last in a chain. Used inside of *CC/DEFINE*.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)


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

5.1.3 Functions

Function: call-continuation CONT

Call the continuation of a *CONTINUATION-RESULT*, checking if one is defined. Emits a warning when calling on an object with *OPERATION* :terminate.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Function: cc/continue CONT

Call the continuation of a *CONTINUATION-RESULT*, checking if one is defined and modifying *CONT*. Emits a warning when calling on an object with *OPERATION* :terminate.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Function: follow-chain RESULT

Return whether *RESULT* has a valid continuation.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)


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

5.1.4 Generic functions

Generic Function: combine-continuations HEAD TAIL

Combine two continuations to form a new one. *HEAD* and *TAIL* can (independently) be *CONTINUATION-RESULT* or a function returning a *CONTINUATION-RESULT*

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Methods
Method: combine-continuations (HEAD function) (TAIL function)
Method: combine-continuations (HEAD function) (TAIL continuation-result)
Method: combine-continuations (HEAD continuation-result) (TAIL function)
Method: combine-continuations (HEAD continuation-result) (TAIL continuation-result)
Generic Function: continuation OBJECT
Package

trivial-continuation

Methods
Method: continuation (CONTINUATION-RESULT continuation-result)

The *CONTINUATION* slot holds the continuation function to be called next.

Source

trivial-continuation.lisp (file)

Generic Function: operation OBJECT
Package

trivial-continuation

Methods
Method: operation (CONTINUATION-RESULT continuation-result)

The *OPERATION* slot controls how two continuations are to be combined.
Valid values are:
:combine - the current continuation carries a valid result, and still other continuations should be called :delegate - the current continuation does not have any result, but still another continuation should be called :terminate - no further continuation shall be called

Source

trivial-continuation.lisp (file)

Generic Function: result OBJECT
Package

trivial-continuation

Methods
Method: result (CONTINUATION-RESULT continuation-result)

The *RESULT* slot carries the return value from calling a continuation.

Source

trivial-continuation.lisp (file)


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

5.1.5 Classes

Class: continuation-result ()

The *CONTINUATION-RESULT* class represents the result of a method, the continuation from it and the combination operation.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: result

The *RESULT* slot carries the return value from calling a continuation.

Initargs

:result

Readers

result (generic function)

Slot: continuation

The *CONTINUATION* slot holds the continuation function to be called next.

Type

(or null function)

Initargs

:continuation

Readers

continuation (generic function)

Slot: operation

The *OPERATION* slot controls how two continuations are to be combined.
Valid values are:
:combine - the current continuation carries a valid result, and still other continuations should be called :delegate - the current continuation does not have any result, but still another continuation should be called :terminate - no further continuation shall be called

Type

(member :terminate :combine :delegate)

Initargs

:operation

Initform

:terminate

Readers

operation (generic function)


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

5.2 Internal definitions


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

5.2.1 Special variables

Special Variable: +continuation-failed+
Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Special Variable: +continue-to-next+
Package

trivial-continuation

Source

trivial-continuation.lisp (file)


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

5.2.2 Functions

Function: combine FIRST-CONT NEXT-CONT
Package

trivial-continuation

Source

trivial-continuation.lisp (file)

Function: rewrite-terminators NAME BODY

Run over *BODY* adding (:named-define name) to every cc/{delegate|terminate|create-return|return}.

Package

trivial-continuation

Source

trivial-continuation.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   T  
Index Entry  Section

F
File, Lisp, trivial-continuation.asd: The trivial-continuation<dot>asd file
File, Lisp, trivial-continuation/documentation.lisp: The trivial-continuation/documentation<dot>lisp file
File, Lisp, trivial-continuation/package.lisp: The trivial-continuation/package<dot>lisp file
File, Lisp, trivial-continuation/trivial-continuation.lisp: The trivial-continuation/trivial-continuation<dot>lisp file

L
Lisp File, trivial-continuation.asd: The trivial-continuation<dot>asd file
Lisp File, trivial-continuation/documentation.lisp: The trivial-continuation/documentation<dot>lisp file
Lisp File, trivial-continuation/package.lisp: The trivial-continuation/package<dot>lisp file
Lisp File, trivial-continuation/trivial-continuation.lisp: The trivial-continuation/trivial-continuation<dot>lisp file

T
trivial-continuation.asd: The trivial-continuation<dot>asd file
trivial-continuation/documentation.lisp: The trivial-continuation/documentation<dot>lisp file
trivial-continuation/package.lisp: The trivial-continuation/package<dot>lisp file
trivial-continuation/trivial-continuation.lisp: The trivial-continuation/trivial-continuation<dot>lisp file

Jump to:   F   L   T  

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

A.2 Functions

Jump to:   C   F   G   M   O   R  
Index Entry  Section

C
call-continuation: Exported functions
cc/continue: Exported functions
cc/create-return: Exported macros
cc/define: Exported macros
cc/define-lambda: Exported macros
cc/define-named-lambda: Exported macros
cc/delegate: Exported macros
cc/return: Exported macros
cc/terminate: Exported macros
combine: Internal functions
combine-continuations: Exported generic functions
combine-continuations: Exported generic functions
combine-continuations: Exported generic functions
combine-continuations: Exported generic functions
combine-continuations: Exported generic functions
continuation: Exported generic functions
continuation: Exported generic functions

F
follow-chain: Exported functions
Function, call-continuation: Exported functions
Function, cc/continue: Exported functions
Function, combine: Internal functions
Function, follow-chain: Exported functions
Function, rewrite-terminators: Internal functions

G
Generic Function, combine-continuations: Exported generic functions
Generic Function, continuation: Exported generic functions
Generic Function, operation: Exported generic functions
Generic Function, result: Exported generic functions

M
Macro, cc/create-return: Exported macros
Macro, cc/define: Exported macros
Macro, cc/define-lambda: Exported macros
Macro, cc/define-named-lambda: Exported macros
Macro, cc/delegate: Exported macros
Macro, cc/return: Exported macros
Macro, cc/terminate: Exported macros
Method, combine-continuations: Exported generic functions
Method, combine-continuations: Exported generic functions
Method, combine-continuations: Exported generic functions
Method, combine-continuations: Exported generic functions
Method, continuation: Exported generic functions
Method, operation: Exported generic functions
Method, result: Exported generic functions

O
operation: Exported generic functions
operation: Exported generic functions

R
result: Exported generic functions
result: Exported generic functions
rewrite-terminators: Internal functions

Jump to:   C   F   G   M   O   R  

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

A.3 Variables

Jump to:   +   @  
C   O   R   S  
Index Entry  Section

+
+continuation-failed+: Internal special variables
+continue-to-next+: Internal special variables

@
@trivial-continuation-contributing: Exported special variables
@trivial-continuation-description: Exported special variables
@trivial-continuation-example: Exported special variables
@trivial-continuation-exported: Exported special variables
@trivial-continuation-installing: Exported special variables
@trivial-continuation-license: Exported special variables
@trivial-continuation-manual: Exported special variables

C
continuation: Exported classes

O
operation: Exported classes

R
result: Exported classes

S
Slot, continuation: Exported classes
Slot, operation: Exported classes
Slot, result: Exported classes
Special Variable, +continuation-failed+: Internal special variables
Special Variable, +continue-to-next+: Internal special variables
Special Variable, @trivial-continuation-contributing: Exported special variables
Special Variable, @trivial-continuation-description: Exported special variables
Special Variable, @trivial-continuation-example: Exported special variables
Special Variable, @trivial-continuation-exported: Exported special variables
Special Variable, @trivial-continuation-installing: Exported special variables
Special Variable, @trivial-continuation-license: Exported special variables
Special Variable, @trivial-continuation-manual: Exported special variables

Jump to:   +   @  
C   O   R   S  

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

A.4 Data types

Jump to:   C   P   S   T  
Index Entry  Section

C
Class, continuation-result: Exported classes
continuation-result: Exported classes

P
Package, trivial-continuation: The trivial-continuation package

S
System, trivial-continuation: The trivial-continuation system

T
trivial-continuation: The trivial-continuation system
trivial-continuation: The trivial-continuation package

Jump to:   C   P   S   T