From d07fc9735f40e545edda456e15dbab783c500f6a Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sun, 17 Jan 2016 22:53:01 -0800 Subject: subtractIfCan$CancellationAbelianMonoid: return the more principled Maybe % --- src/algebra/integer.spad.pamphlet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/algebra/integer.spad.pamphlet') diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet index a91b6d63..fde8ef88 100644 --- a/src/algebra/integer.spad.pamphlet +++ b/src/algebra/integer.spad.pamphlet @@ -251,8 +251,8 @@ NonNegativeInteger: Join(OrderedAbelianMonoidSup,Monoid) with shift(x:%, n:Integer):% == ASH(x,n)$Lisp subtractIfCan(x, y) == c:Integer := rep x - rep y - negative? c => "failed" - per c + negative? c => nothing + just per c @ -- cgit v1.2.3