diff options
Diffstat (limited to 'tests/lang/eval-okay-arithmetic.nix')
-rw-r--r-- | tests/lang/eval-okay-arithmetic.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/lang/eval-okay-arithmetic.nix b/tests/lang/eval-okay-arithmetic.nix index 735f01cf4e69..ac1fcb73c073 100644 --- a/tests/lang/eval-okay-arithmetic.nix +++ b/tests/lang/eval-okay-arithmetic.nix @@ -2,7 +2,10 @@ with import ./lib.nix; let { - range = first: last: [first] ++ (if first == last then [] else range (builtins.add first 1) last); + range = first: last: + if builtins.lessThan last first + then [] + else [first] ++ range (builtins.add first 1) last; /* Supposedly tail recursive version: |