Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Identity I = Combinator{ Name: "I", Arguments: []string{"x"}, Definition: "x", } // Constancy K = Combinator{ Name: "K", Arguments: []string{"x", "y"}, Definition: "x", } // Interchange T = Combinator{ Name: "T", Arguments: []string{"x", "y", "z"}, Definition: "xzy", } // Composition Z = Combinator{ Name: "Z", Arguments: []string{"x", "y", "z"}, Definition: "x(yz)", } // Fusion S = Combinator{ Name: "S", Arguments: []string{"x", "y", "z"}, Definition: "xz(yz)", } // All of Schönfinkel's defined combinators Schonfinkel = Basis{I, K, T, Z, S} )
From section 3 of the paper
SK and SKI (https://en.wikipedia.org/wiki/SKI_combinator_calculus)
View Source
var ( B = Combinator{ Name: "B", Arguments: []string{"x", "y", "z"}, Definition: "x(yz)", } C = Combinator{ Name: "C", Arguments: []string{"x", "y", "z"}, Definition: "xzy", } W = Combinator{ Name: "W", Arguments: []string{"x", "y"}, Definition: "xyy", } BCKW = Basis{B, C, K, W} )
BCKW (https://en.wikipedia.org/wiki/B,_C,_K,_W_system)
View Source
var ( Zero = Combinator{ Name: "0", Arguments: []string{"f", "x"}, Definition: "x", } Succ = Combinator{ Name: "S", Arguments: []string{"n", "f", "x"}, Definition: "f(nfx)", } Plus = Combinator{ Name: "P", Arguments: []string{"m", "n", "f", "x"}, Definition: "mf(nfx)", } Mult = Combinator{ Name: "M", Arguments: []string{"m", "n", "f", "x"}, Definition: "m(nf)x", } Exp = Combinator{ Name: "E", Arguments: []string{"m", "n", "f", "x"}, Definition: "nmfx", } Church = Basis{Zero, Succ, Plus, Mult, Exp} )
Church Encoding (https://en.wikipedia.org/wiki/Church_encoding)
View Source
var ( Iota = Basis{ S, K, Combinator{ Name: "i", Arguments: []string{"x"}, Definition: "xSK", }, } )
Iota (https://en.wikipedia.org/wiki/Iota_and_Jot)
View Source
var MaxFrames = 1000000
Functions ¶
func WellDefined ¶
Returns whether the statement is well defined or not
Types ¶
type Basis ¶
type Basis []Combinator
func (Basis) With ¶
func (b Basis) With(combinator Combinator) Basis
Adds an additional Combinator to the Basis
type Combinator ¶
Click to show internal directories.
Click to hide internal directories.