Skip to content

Instantly share code, notes, and snippets.

@Gabriella439
Created April 21, 2020 05:46
Show Gist options
  • Save Gabriella439/c8573514cf4b5690ac5efdddb88c11bc to your computer and use it in GitHub Desktop.
Save Gabriella439/c8573514cf4b5690ac5efdddb88c11bc to your computer and use it in GitHub Desktop.
Example of unrolled recursion in Dhall
⊢ :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