Files
lambda/pkg/saccharine/expression.go

32 lines
545 B
Go

package saccharine
type Expression interface {
expression()
}
/** ------------------------------------------------------------------------- */
type Abstraction struct {
Parameters []string
Body Expression
}
type Application struct {
Abstraction Expression
Arguments []Expression
}
type Atom struct {
Name string
}
type Clause struct {
Statements []Statement
Returns Expression
}
func (Abstraction) expression() {}
func (Application) expression() {}
func (Atom) expression() {}
func (Clause) expression() {}