Skip to content

Instantly share code, notes, and snippets.

@ear7h
Last active June 15, 2022 23:08
Show Gist options
  • Save ear7h/5257e0566ff77a5cdf25748fd9e560c3 to your computer and use it in GitHub Desktop.
Save ear7h/5257e0566ff77a5cdf25748fd9e560c3 to your computer and use it in GitHub Desktop.
dhall-list-drop
let drop = https://prelude.dhall-lang.org/List/drop
let generate = https://prelude.dhall-lang.org/List/generate
let f = \(g : Natural) -> generate g Natural (\(x : Natural) -> x)
in \(g : Natural) -> \(n : Natural) -> drop n Natural (f g)
1 1
2 10
3 22
4 46
5 95
6 200
7 436
8 979
9 2227
10 5052
for x in {1..10}; do
printf "$x\t"
echo "./list-drop-test.dhall $x" | dhall | wc -l
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment