chrismwendt / combinator-calculus

SK combinatory logic interpreter written in Haskell
1 stars 0 forks source link

Change the internal representation of combinatory terms #7

Closed chrismwendt closed 10 years ago

chrismwendt commented 10 years ago

Flatten the left branch of Apply by changing the internal representation:

data Term = Apply Combinator [Term]
data Combinator = S | K

This is a nicer representation to work with because it's easier to determine whether or not a combinator is given enough arguments and an application can be performed.