mirror of
https://github.com/anoma/juvix.git
synced 2024-12-15 01:52:11 +03:00
23 lines
455 B
Plaintext
23 lines
455 B
Plaintext
module M;
|
|
open import Stdlib.Prelude;
|
|
|
|
S : {A : Type} → {B : Type} → {C : Type} → (A → B → C) → (A → B) → A → C;
|
|
S x y z := x z (y z);
|
|
|
|
K : {A : Type} → {B : Type} → A → B → A;
|
|
K x y := x;
|
|
|
|
I : {A : Type} → A → A;
|
|
I := S K (K {_} {Bool});
|
|
|
|
main : IO;
|
|
main := printNatLn
|
|
$ I {Nat} 1
|
|
+ I I 1
|
|
+ I (I 1)
|
|
+ I 1
|
|
+ I (I I) I (I I I) 1
|
|
+ I I I (I I I (I I)) I (I I) I I I 1;
|
|
|
|
end;
|