From 159e621d1a9c4391b53f3d822109c36931934698 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 2 Aug 2013 15:21:17 +0000 Subject: Overload the ‘+’ operator to support integer addition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/lang/eval-okay-arithmetic.exp | 2 +- tests/lang/eval-okay-arithmetic.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/lang/eval-okay-arithmetic.exp b/tests/lang/eval-okay-arithmetic.exp index 9c113c6f75..861c12661a 100644 --- a/tests/lang/eval-okay-arithmetic.exp +++ b/tests/lang/eval-okay-arithmetic.exp @@ -1 +1 @@ -1275 +1854 diff --git a/tests/lang/eval-okay-arithmetic.nix b/tests/lang/eval-okay-arithmetic.nix index ac1fcb73c0..1f45b122a2 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; } -- cgit 1.4.1