combinator-interactive-0.1.2: SKI Combinator interpreter

Safe HaskellNone

Data.Combinator

Synopsis

Documentation

data Expr e Source

Constructors

(Expr e) :$ (Expr e) 
I 
K 
S 
Var e 

Instances

Monad Expr 
Functor Expr 
Foldable Expr 
Traversable Expr 
Eq e => Eq (Expr e) 
Ord e => Ord (Expr e) 
Show e => Show (Expr e) 
Lift e0 => Lift (Expr e0) 

length :: Expr e -> IntSource

The length function returns a length of an expression.

subst :: Eq e => e -> Expr e -> Expr e -> Expr eSource

bindee :: Eq e => e -> Expr e -> Expr eSource

The bindee function transforms an expression to a combinator which binds specified variable when it is applied.

apply :: Expr e -> Expr e -> Expr eSource

eval :: Expr e -> Expr eSource