Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn items-total2 [items]
- (loop [total 0
- remaining-items items]
- (if (empty? remaining-items)
- total
- (let [item (first remaining-items)
- item-price (:price item)]
- (recur (+ total item-price) (rest remaining-items))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement