diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-01-03 23:24:33 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-01-03 23:25:08 +0300 |
commit | 65ed5fb564d11a2f36bc5ce8e63daca48c9bc919 (patch) | |
tree | 4a04ac749a80a8537a51e2d7545693f7cdd023dd | |
parent | f5bc1763ce762ef85ee85893242f83379e8a937b (diff) | |
download | gcd-65ed5fb564d11a2f36bc5ce8e63daca48c9bc919.tar.gz |
nix: updated for modern nix
-rw-r--r-- | gcd.nix | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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)); |