5 lines
153 B
Clojure
5 lines
153 B
Clojure
(defn total-cost [item-price num-items]
|
|
"Returns the total price to buy the given number of items"
|
|
(* item-price num-items))
|
|
|
|
(total-cost 1 5); => 5
|