about summary refs log tree commit diff
path: root/tests/lang/lib.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/lib.nix')
-rw-r--r--tests/lang/lib.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lang/lib.nix b/tests/lang/lib.nix
index 262cdd7e8fd0..028a538314b7 100644
--- a/tests/lang/lib.nix
+++ b/tests/lang/lib.nix
@@ -54,8 +54,8 @@ rec {
   const = x: y: x;
 
   range = first: last:
-    if builtins.lessThan last first
-    then []
-    else [first] ++ range (builtins.add first 1) last;
+    if first > last
+      then []
+      else genList (n: first + n) (last - first + 1);
 
 }