Commit 18f406afc257d3e69c65c686f7283b4dcade9716

Thomas de Grivel 2023-07-11T13:20:42

README.md

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/README.md b/README.md
index 084ce71..0830bc2 100644
--- a/README.md
+++ b/README.md
@@ -24,8 +24,8 @@ Your own order
 (defstruct fruit weight price)
 
 (defmethod compare ((a fruit) (b fruit))
-  (compare (/ (fruit-price a) (fruit-weight a))
-  	       (/ (fruit-price b) (fruit-weight b))))
+  (compare (* (fruit-price a) (fruit-weight a))
+           (* (fruit-price b) (fruit-weight b))))
 
 (let ((apple (make-fruit :price 0.3 :weight 100))
       (orange (make-fruit :price 4.5 :weight 1000)))