The fold Reference Manual

This is the fold Reference Manual, version 1.0.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 12:18:57 2026 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 fold

FOLD-LEFT and FOLD-RIGHT

Maintainer

Joe Marshall <>

Author

Joe Marshall <>

Contact

Home Page

https://github.com/jrm-code-project/fold/

Source Control

(GIT https://github.com/jrm-code-project/fold.git)

Bug Tracker

https://github.com/jrm-code-project/fold/issues

License

MIT

Long Description

FOLD-LEFT and FOLD-RIGHT are higher-order functions that apply a function to a list of arguments in a left-to-right or right-to-left order.

Version

1.0.2

Source

fold.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 fold/fold.asd

Source

fold.asd.

Parent Component

fold (system).

ASDF Systems

fold.


3.1.2 fold/fold.lisp

Dependency

package.lisp (file).

Source

fold.asd.

Parent Component

fold (system).

Public Interface
Internals

expand-fold-left (function).


3.1.3 fold/package.lisp

Source

fold.asd.

Parent Component

fold (system).

Packages

fold.


4 Packages

Packages are listed by definition order.


4.1 fold

Implementation of FOLD-LEFT and FOLD-RIGHT.

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

expand-fold-left (function).


5 Definitions

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


5.1 Public Interface


5.1.1 Special variables

Special Variable: *truncate-fold*

If true, fold-left and fold-right on multiple sequences will stop folding when any of the sequences is exhausted.

Package

fold.

Source

fold.lisp.


5.1.2 Ordinary functions

Function: alist-fold-left (fn init alist)
Package

fold.

Source

fold.lisp.

Function: alist-fold-right (fn alist final)
Package

fold.

Source

fold.lisp.

Function: fold-left (function initial list &rest lists)
Package

fold.

Source

fold.lisp.

Function: fold-right (function list final &rest args)
Package

fold.

Source

fold.lisp.

Function: hash-table-fold-left (fn init hashtable)
Package

fold.

Source

fold.lisp.

Function: hash-table-fold-right (fn hashtable final)
Package

fold.

Source

fold.lisp.

Function: plist-fold-left (fn init plist)
Package

fold.

Source

fold.lisp.

Function: plist-fold-right (fn plist final)
Package

fold.

Source

fold.lisp.


5.2 Internals


5.2.1 Ordinary functions

Function: expand-fold-left (function-spec initial list &rest lists)
Package

fold.

Source

fold.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*truncate-fold*: Public special variables

S
Special Variable, *truncate-fold*: Public special variables