diff options
| author | El-BG-1970 <elouangros@hotmail.com> | 2022-07-28 22:01:43 +0200 |
|---|---|---|
| committer | El-BG-1970 <elouangros@hotmail.com> | 2022-07-28 22:01:43 +0200 |
| commit | 39730c70367bcaa96e34982b90268d2170c75e90 (patch) | |
| tree | df23eb96ff5db84ab6b6c82488f433c85758b893 /src/commodities.lisp | |
| parent | 201bdac932778ccf420df492acb7eecaa209b0dd (diff) | |
| download | transacc-39730c70367bcaa96e34982b90268d2170c75e90.tar.gz | |
added some checks to commodities and inventory to pass tests
Diffstat (limited to 'src/commodities.lisp')
| -rw-r--r-- | src/commodities.lisp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commodities.lisp b/src/commodities.lisp index 474fe7d..1302a98 100644 --- a/src/commodities.lisp +++ b/src/commodities.lisp @@ -13,6 +13,7 @@ :accessor price))) (defun new-commodity (name price) - (make-instance 'commodity - :name name - :price price)) + (when (> price 0) + (make-instance 'commodity + :name name + :price price))) |
