Comment

Comment by hackyhacky

Maybe I'm just missing something, but the "domain expert" that is described here is just... a function? The big win in Clojure is apparently using code instead of types?

  (defn apply-shipping-rules [order]
    (cond-> order
      (and (= :premium (:customer-type order))
           (> (:order-total order) 100))
      (assoc :shipping-cost 0)))
parent hackyhacky 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton