diff options
-rw-r--r-- | net/ricketyspace/sicp/one/seventeen.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ricketyspace/sicp/one/seventeen.scm b/net/ricketyspace/sicp/one/seventeen.scm index 1a5ec15..48717e9 100644 --- a/net/ricketyspace/sicp/one/seventeen.scm +++ b/net/ricketyspace/sicp/one/seventeen.scm @@ -41,6 +41,6 @@ B must be an even number." (define (fast-* a b) "Return A * B." - (cond ((= b 1) a) + (cond ((= b 0) 0) ((even? b) (double (fast-* a (halve b)))) (else (+ a (fast-* a (- b 1)))))) |