Last active
June 15, 2022 23:08
-
-
Save ear7h/5257e0566ff77a5cdf25748fd9e560c3 to your computer and use it in GitHub Desktop.
dhall-list-drop
This file contains 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 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) |
This file contains 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
1 1 | |
2 10 | |
3 22 | |
4 46 | |
5 95 | |
6 200 | |
7 436 | |
8 979 | |
9 2227 | |
10 5052 |
This file contains 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
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