Advertisement
denyshubh

clojore

Mar 2nd, 2023 (edited)
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. (defn items-total2 [items]
  2. (loop [total 0
  3. remaining-items items]
  4. (if (empty? remaining-items)
  5. total
  6. (let [item (first remaining-items)
  7. item-price (:price item)]
  8. (recur (+ total item-price) (rest remaining-items))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement