The cl-lambdacalc Reference Manual

Table of Contents

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 3.0 "Montgomery Scott" on Sun May 15 03:54:37 2022 GMT+0.


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

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


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 cl-lambdacalc

Author

S M McLeod

License

MIT

Description

Define Lisp functions using lambda calculus syntax

Version

0.0.1

Dependency

cl-ppcre

Source

cl-lambdacalc.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 cl-lambdacalc.asd

Location

cl-lambdacalc.asd

Systems

cl-lambdacalc (system)


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

3.1.2 cl-lambdacalc/package.lisp

Parent

cl-lambdacalc (system)

Location

package.lisp

Packages

cl-lambdacalc


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

3.1.3 cl-lambdacalc/cl-lambdacalc.lisp

Dependency

package.lisp (file)

Parent

cl-lambdacalc (system)

Location

cl-lambdacalc.lisp

Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 cl-lambdacalc

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 Macros

Macro: define-lc-func NAME FUNC-STRING
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)


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

5.1.2 Functions

Function: church-numeral-to-number FUNC
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)

Function: lc-add M
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-and X
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-expt X
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-false X
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-false-p FUNC
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)

Function: lc-func FUNC-STRING
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)

Function: lc-if X
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-mult X
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-not X
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-or X
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-succ N
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-true X
Package

cl-lambdacalc

Source

/builds/quickref/quickref/bin/declt

Function: lc-true-p FUNC
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)

Function: number-to-church-numeral NUM
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Macros

Macro: try-or-nil BODY
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)


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

5.2.2 Functions

Function: close-paren-position S
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)

Function: lc-boolean-test FUNC BOOL
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)

Function: next-body-token BODY
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)

Function: parse-func-string FUNC-STRING
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)

Function: unstructured-body-list BODY
Package

cl-lambdacalc

Source

cl-lambdacalc.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-lambdacalc.asd: The cl-lambdacalc․asd file
cl-lambdacalc/cl-lambdacalc.lisp: The cl-lambdacalc/cl-lambdacalc․lisp file
cl-lambdacalc/package.lisp: The cl-lambdacalc/package․lisp file

F
File, Lisp, cl-lambdacalc.asd: The cl-lambdacalc․asd file
File, Lisp, cl-lambdacalc/cl-lambdacalc.lisp: The cl-lambdacalc/cl-lambdacalc․lisp file
File, Lisp, cl-lambdacalc/package.lisp: The cl-lambdacalc/package․lisp file

L
Lisp File, cl-lambdacalc.asd: The cl-lambdacalc․asd file
Lisp File, cl-lambdacalc/cl-lambdacalc.lisp: The cl-lambdacalc/cl-lambdacalc․lisp file
Lisp File, cl-lambdacalc/package.lisp: The cl-lambdacalc/package․lisp file

Jump to:   C   F   L  

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

A.2 Functions

Jump to:   C   D   F   L   M   N   P   T   U  
Index Entry  Section

C
church-numeral-to-number: Exported functions
close-paren-position: Internal functions

D
define-lc-func: Exported macros

F
Function, church-numeral-to-number: Exported functions
Function, close-paren-position: Internal functions
Function, lc-add: Exported functions
Function, lc-and: Exported functions
Function, lc-boolean-test: Internal functions
Function, lc-expt: Exported functions
Function, lc-false: Exported functions
Function, lc-false-p: Exported functions
Function, lc-func: Exported functions
Function, lc-if: Exported functions
Function, lc-mult: Exported functions
Function, lc-not: Exported functions
Function, lc-or: Exported functions
Function, lc-succ: Exported functions
Function, lc-true: Exported functions
Function, lc-true-p: Exported functions
Function, next-body-token: Internal functions
Function, number-to-church-numeral: Exported functions
Function, parse-func-string: Internal functions
Function, unstructured-body-list: Internal functions

L
lc-add: Exported functions
lc-and: Exported functions
lc-boolean-test: Internal functions
lc-expt: Exported functions
lc-false: Exported functions
lc-false-p: Exported functions
lc-func: Exported functions
lc-if: Exported functions
lc-mult: Exported functions
lc-not: Exported functions
lc-or: Exported functions
lc-succ: Exported functions
lc-true: Exported functions
lc-true-p: Exported functions

M
Macro, define-lc-func: Exported macros
Macro, try-or-nil: Internal macros

N
next-body-token: Internal functions
number-to-church-numeral: Exported functions

P
parse-func-string: Internal functions

T
try-or-nil: Internal macros

U
unstructured-body-list: Internal functions

Jump to:   C   D   F   L   M   N   P   T   U  

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

A.3 Variables


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

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-lambdacalc: The cl-lambdacalc system
cl-lambdacalc: The cl-lambdacalc package

P
Package, cl-lambdacalc: The cl-lambdacalc package

S
System, cl-lambdacalc: The cl-lambdacalc system

Jump to:   C   P   S