churf/demo/rank4.crf
2023-05-24 22:12:45 +02:00

20 lines
465 B
Text

.+ : Int -> Int -> Int
.+ x y = 0
const : a -> b -> a
const x y = x
applyapplyapplyId : (forall c. c -> (forall b. (forall a. a -> a) -> b -> b) -> c) -> d -> d
applyapplyapplyId f x = f x applyId
applyapplyId : c -> (forall b. (forall a. a -> a) -> b -> b) -> c
applyapplyId x f = f id x
applyId : (forall a. a -> a) -> b -> b
applyId f x = f x
id : a -> a
id x = x
main = applyapplyapplyId applyapplyId 50 + const 100 (applyapplyapplyId applyapplyId 'G')