Created
April 21, 2020 05:46
-
-
Save Gabriella439/c8573514cf4b5690ac5efdddb88c11bc to your computer and use it in GitHub Desktop.
Example of unrolled recursion in Dhall
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 List/generate = https://prelude.dhall-lang.org/List/generate | |
| List/generate : ∀(n : Natural) → ∀(a : Type) → ∀(f : Natural → a) → List a | |
| ⊢ List/generate 10 | |
| λ(a : Type) | |
| → λ(f : Natural → a) | |
| → [ f 0, f 1, f 2, f 3, f 4, f 5, f 6, f 7, f 8, f 9 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment