This commit is contained in:
2024-12-18 19:41:12 -06:00
committed by James Eversole
parent b3dd945b82
commit dcf8120dea
4 changed files with 6 additions and 39 deletions

View File

@ -5,10 +5,7 @@ import Control.Monad.State
import qualified Data.Map as Map
import Data.Map (Map)
data T
= Leaf -- t
| Stem T -- t t
| Fork T T -- t a b
data T = Leaf | Stem T | Fork T T
deriving (Show, Eq, Ord)
apply :: T -> T -> T
@ -40,14 +37,6 @@ _K = Stem Leaf
_I :: T
_I = apply (apply _S _K) _K -- Fork (Stem (Stem Leaf)) (Stem Leaf)
-- Lambda
data Lambda
= Var String
| App Lambda Lambda
| Lam String Lambda
| TC T
deriving (Show, Eq)
-- Booleans
_false :: T
_false = Leaf