ShenDoc 30


 

 

The Syntax of KLambda

is very simple and conforms to a Lisp. Well-formed sentences of Kλ are symbolic expressions (s-exprs).

Any symbol, boolean, string or number is an atom.

Any atom is an s-expr as is () (the empty list).

Any abstraction (lambda X Y) is an s-expr if X is a symbol and Y is an s-expr.

Any local assignment (let X Y Z) is an s-expr if X is a symbol and Y and Z are s-exprs.

Any definition (defun F X Y) is an s-expr if F is a symbol and X is a (possibly empty) list of non-repeated symbols (formal parameters) and Y is an s-expr. Note definitions are top level expressions and are not embedded.

Any application (X1 ... Xn) is an s-expr if X1, ... , Xn are s-exprs.

Acknowledgements

History
Basic Types in Shen and Kλ
The Primitive Functions of Kλ
The Syntax of Kλ
Notes on the Implementation of Kλ
Boolean Operators
The Syntax of Symbols
The Semantics of Symbols in Shen and Kλ
Packages
Prolog
Shen-YACC
Strings
Strings and Pattern Matching
Lists
Streams
Character Streams and Byte Streams
Bytes and Unicode
Reader Macros
Vectors
Standard Vectors and Pattern Matching
Non-standard Vectors and Tuples
Equality
I/O
Generic Functions
Eval
Type Declarations
External Global Variables
Property Lists and Hashing
Error Handling
Numbers
Floats and Integers
The Timer
Comments
Special Forms

Built by Shen Technology (c) Mark Tarver, September 2021