Created
July 10, 2019 00:48
-
-
Save exarkun/61c3972dae7871a4c65054757efdcd37 to your computer and use it in GitHub Desktop.
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
nix-repl> with import <nixpkgs> { }; let range' = start: end: if start == end then [ ] else lib.range start (end - 1); in range' 0 0 | |
[ ] | |
nix-repl> with import <nixpkgs> { }; let range' = start: end: if start == end then [ ] else lib.range start (end - 1); in range' 0 1 | |
[ 0 ] | |
nix-repl> with import <nixpkgs> { }; let range' = start: end: if start == end then [ ] else lib.range start (end - 1); in range' 0 10 | |
[ 0 1 2 3 4 5 6 7 8 9 ] | |
nix-repl> with import <nixpkgs> { }; let range' = start: end: if start == end then [ ] else lib.range start (end - 1); in range' 5 10 | |
[ 5 6 7 8 9 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment