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.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/lang/lib.nix b/tests/lang/lib.nix
index cdba2b947793..882005dc1b5c 100644
--- a/tests/lang/lib.nix
+++ b/tests/lang/lib.nix
@@ -53,4 +53,9 @@ rec {
 
   const = x: y: x;
 
+  range = first: last:
+    if builtins.lessThan last first
+    then []
+    else [first] ++ range (builtins.add first 1) last;
+
 }