Created
August 15, 2020 19:21
-
-
Save kubukoz/c6363007f2780b17cd4387ac029ad41a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let Rule | |
| : Type | |
| = ∀(_Rule : Type) → | |
| ∀(One : _Rule) → | |
| ∀(Two : _Rule) → | |
| ∀(Many : List _Rule → _Rule) → | |
| _Rule | |
| let example | |
| : Rule | |
| = λ(_Rule : Type) → | |
| λ(One : _Rule) → | |
| λ(Two : _Rule) → | |
| λ(Many : List _Rule → _Rule) → | |
| Many [ One, Two, Many [ Two, One ] ] | |
| let all | |
| : Rule → Natural | |
| = λ(r : Rule) → | |
| r | |
| Natural | |
| 1 | |
| 2 | |
| ( λ(many : List Natural) → | |
| List/fold | |
| Natural | |
| many | |
| Natural | |
| (λ(x : Natural) → λ(y : Natural) → x + y) | |
| 0 | |
| ) | |
| in all example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment