The trivial-tco Reference Manual

This is the trivial-tco Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:57:32 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 trivial-tco

A library to assist in ensuring certain code is executed with tail call optimizations enabled.

Author

Ralph Möritz

License

MIT

Long Description

# trivial-tco

A Common Lisp library to assist in ensuring certain code is executed with tail call optimizations enabled.

## Installation

“‘
cd ~/quicklisp/local-projects
git clone https://github.com/rmoritz/trivial-tco
“‘

## Usage

“‘common-lisp
(ql:quickload :trivial-tco)

(tco:with-tail-call-optimization ()
(labels ((sum-aux (acc x)
(if (zerop x)
acc
(sum-aux (+ acc x) (- x 1))))
(sum (n)
(sum-aux 0 n)))
(sum 1000000)))
“‘

## Status

There is a small test suite that can be executed via ‘(ql:quickload :trivial-tco-test)‘ or ‘(asdf:test-system :trivial-tco)‘. I’ve only run it on [CCL](http://ccl.clozure.com).

## Bugs

If you believe you’ve found a bug, please do
[report it](https://github.com/rmoritz/trivial-tco/issues).

## Author

* Ralph Möritz (ralphmoritz@outlook.com)

## License

Copyright (c) Ralph Möritz 2013.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**

Version

0.1

Source

trivial-tco.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 trivial-tco/src

Source

trivial-tco.asd.

Parent Component

trivial-tco (system).

Child Components

4 Files

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


4.1 Lisp


4.1.1 trivial-tco/trivial-tco.asd

Source

trivial-tco.asd.

Parent Component

trivial-tco (system).

ASDF Systems

trivial-tco.

Packages

trivial-tco-asd.


4.1.2 trivial-tco/src/package.lisp

Source

trivial-tco.asd.

Parent Component

src (module).

Packages

trivial-tco.


4.1.3 trivial-tco/src/trivial-tco.lisp

Dependency

package.lisp (file).

Source

trivial-tco.asd.

Parent Component

src (module).

Public Interface

with-tail-call-optimization (macro).


5 Packages

Packages are listed by definition order.


5.1 trivial-tco

Source

package.lisp.

Nickname

tco

Use List

common-lisp.

Public Interface

with-tail-call-optimization (macro).


5.2 trivial-tco-asd

Source

trivial-tco.asd.

Use List
  • asdf/interface.
  • common-lisp.

6 Definitions

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


6.1 Public Interface


6.1.1 Macros

Macro: with-tail-call-optimization ((&optional treat-warnings-as-errors) &body body)
Package

trivial-tco.

Source

trivial-tco.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   M   W  
Index Entry  Section

M
Macro, with-tail-call-optimization: Public macros

W
with-tail-call-optimization: Public macros


A.3 Variables