about summary refs log tree commit diff
path: root/tests/lang
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-09-24T15·21+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-09-24T15·21+0000
commitdf8873e14ad071812e27f38b69783f04dbae5f44 (patch)
tree34be83feb4734efcb21f4f3d1ced66db4c24e382 /tests/lang
parent2ab4bc44c780d2e28647f7559664675b756f38b9 (diff)
* lessThan primitive for integer comparison.
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/eval-okay-arithmetic.nix5
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: