The trivial-tco Reference Manual

Table of Contents

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

The trivial-tco Reference Manual

This is the trivial-tco Reference Manual, version 0.1, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:42:31 2018 GMT+0.


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

1 Introduction

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

(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.

Bugs

If you believe you've found a bug, please do report it.

Author

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.


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-tco

Author

Ralph Möritz

License

MIT

Description

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

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 (file)

Component

src (module)


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

3 Modules

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


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

3.1 trivial-tco/src

Parent

trivial-tco (system)

Location

src/

Components

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

4 Files

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


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

4.1 Lisp


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

4.1.1 trivial-tco.asd

Location

trivial-tco.asd

Systems

trivial-tco (system)

Packages

trivial-tco-asd


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

4.1.2 trivial-tco/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages

trivial-tco


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

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

Dependency

package.lisp (file)

Parent

src (module)

Location

src/trivial-tco.lisp

Exported Definitions

with-tail-call-optimization (macro)


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

5 Packages

Packages are listed by definition order.


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

5.1 trivial-tco-asd

Source

trivial-tco.asd

Use List

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

5.2 trivial-tco

Source

package.lisp (file)

Nickname

tco

Use List

common-lisp

Exported Definitions

with-tail-call-optimization (macro)


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

6 Definitions

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


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

6.1 Exported definitions


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

6.1.1 Macros

Macro: with-tail-call-optimization (&optional TREAT-WARNINGS-AS-ERRORS) &body BODY
Package

trivial-tco

Source

trivial-tco.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   M   T  
Index Entry  Section

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

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

M
Module, trivial-tco/src: The trivial-tco/src module

T
trivial-tco.asd: The trivial-tco<dot>asd file
trivial-tco/src: The trivial-tco/src module
trivial-tco/src/package.lisp: The trivial-tco/src/package<dot>lisp file
trivial-tco/src/trivial-tco.lisp: The trivial-tco/src/trivial-tco<dot>lisp file

Jump to:   F   L   M   T  

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

A.2 Functions

Jump to:   M   W  
Index Entry  Section

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

W
with-tail-call-optimization: Exported macros

Jump to:   M   W  

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

A.3 Variables


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

A.4 Data types

Jump to:   P   S   T  
Index Entry  Section

P
Package, trivial-tco: The trivial-tco package
Package, trivial-tco-asd: The trivial-tco-asd package

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

T
trivial-tco: The trivial-tco system
trivial-tco: The trivial-tco package
trivial-tco-asd: The trivial-tco-asd package

Jump to:   P   S   T