about summary refs log tree commit diff
path: root/tests/lang/eval-okay-arithmetic.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-08-02T15·21+0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-08-02T15·21+0000
commit159e621d1a9c4391b53f3d822109c36931934698 (patch)
tree848dc085309b9c8c18b655afcba1d722564e9c79 /tests/lang/eval-okay-arithmetic.nix
parent511455965e1a17db3653147a4ac0d284a37915be (diff)
Overload the ‘+’ operator to support integer addition
Diffstat (limited to 'tests/lang/eval-okay-arithmetic.nix')
-rw-r--r--tests/lang/eval-okay-arithmetic.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lang/eval-okay-arithmetic.nix b/tests/lang/eval-okay-arithmetic.nix
index ac1fcb73c073..1f45b122a2bb 100644
--- a/tests/lang/eval-okay-arithmetic.nix
+++ b/tests/lang/eval-okay-arithmetic.nix
@@ -8,14 +8,14 @@ let {
     else [first] ++ range (builtins.add first 1) last;
 
   /* Supposedly tail recursive version:
-  
-  range_ = accum: first: last: 
+
+  range_ = accum: first: last:
     if first == last then ([first] ++ accum)
     else range_ ([first] ++ accum) (builtins.add first 1) last;
 
   range = range_ [];
   */
 
-  body = sum (range 1 50);
+  body = sum (range 1 50) + 123 + 456;
 
 }