The cl-lambdacalc Reference Manual

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

The cl-lambdacalc Reference Manual

This is the cl-lambdacalc Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Sep 15 03:53:50 2022 GMT+0.

Table of Contents


1 Introduction

cl-lambdacalc

This is a simple library that allows you to define lisp functions using lambda calculus syntax. Function strings should use the uppercase letter 'A' as the lambda character. Nested functions may appear in the body of a function (example: Aa.Ab.(Axyz.xyz)ab(Axy.y)), and you may shorten arguments into one group (example: Afx.x is equivalent to Af.Ax.x).

The project includes a number of tests in the cl-lambdacalc-test package. These may be run with the included script.

Installation

You can install the library with Quicklisp.

(ql:quickload "cl-lambdacalc")

Example

> (define-lc-func foo "Ax.Ay.xy")
#<FUNCTION (LAMBDA (X)) {52DF54DB}>

> (funcall (foo (lc-func "Ax.x")) 42)
42

> (funcall (lc-and #'lc-true) #'lc-true)
#<FUNCTION (LAMBDA (X)) {52D34A8B}>

> (lc-true-p (funcall (lc-and #'lc-true) #'lc-true))
T

> (lc-true-p (funcall (lc-and #'lc-true) (lc-not #'lc-true)))
NIL

> (define-lc-func four "Afx.f(f(f(fx)))")
#<FUNCTION (LAMBDA (F)) {52DF583B}>

> (church-numeral-to-number (lc-succ #'four))
5

> (church-numeral-to-number (funcall (lc-expt #'four) #'four))
256

Exported Symbols


2 Systems

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


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

2.1 cl-lambdacalc

Define Lisp functions using lambda calculus syntax

Author

S M McLeod

License

MIT

Version

0.0.1

Dependency

cl-ppcre (system).

Source

cl-lambdacalc.asd.

Child Components

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   [Contents][Index]

3.1.1 cl-lambdacalc/cl-lambdacalc.asd

Source

cl-lambdacalc.asd.

Parent Component

cl-lambdacalc (system).

ASDF Systems

cl-lambdacalc.


3.1.2 cl-lambdacalc/package.lisp

Source

cl-lambdacalc.asd.

Parent Component

cl-lambdacalc (system).

Packages

cl-lambdacalc.


3.1.3 cl-lambdacalc/cl-lambdacalc.lisp

Dependency

package.lisp (file).

Source

cl-lambdacalc.asd.

Parent Component

cl-lambdacalc (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


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

4.1 cl-lambdacalc

Source

package.lisp.

Use List
  • cl-ppcre.
  • common-lisp.
Public Interface
Internals

5 Definitions

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


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

5.1 Public Interface


5.1.1 Macros

Macro: define-lc-func (name func-string)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.


Previous: , Up: Public Interface   [Contents][Index]

5.1.2 Ordinary functions

Function: church-numeral-to-number (func)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.

Function: lc-false-p (func)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.

Function: lc-func (func-string)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.

Function: lc-true-p (func)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.

Function: number-to-church-numeral (num)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.


5.2 Internals


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

5.2.1 Macros

Macro: try-or-nil (body)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.


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

5.2.2 Ordinary functions

Function: close-paren-position (s)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.

Function: lc-boolean-test (func bool)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.

Function: next-body-token (body)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.

Function: parse-func-string (func-string)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.

Function: unstructured-body-list (body)
Package

cl-lambdacalc.

Source

cl-lambdacalc.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.3 Variables