From 65ed5fb564d11a2f36bc5ce8e63daca48c9bc919 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 3 Jan 2017 23:24:33 +0300 Subject: nix: updated for modern nix --- gcd.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcd.nix b/gcd.nix index 385793c..23a2d14 100644 --- a/gcd.nix +++ b/gcd.nix @@ -21,10 +21,9 @@ trace: gcd2: 11 <-> 0 list: let - inherit (builtins) div toString trace - tail head; + inherit (builtins) trace tail head; - rem = x: y: x - y*(div x y); + rem = x: y: x - y*(x / y); gcd2 = x: y: trace "gcd2: ${toString x} <-> ${toString y}" (if y == 0 then x else gcd2 y (rem x y)); -- cgit v1.2.3