 (defn cut-hair [serviced]
   (if (any-seat-occupied?)
     (do
-      (send free-seats free-seat)
+      (swap! free-seats free-seat)
       (Thread/sleep 20)
       (inc serviced))
     serviced))

; barber <serviced>
(def barber (agent 0))
; seats <free>
(def free-seats (agent 3))

(defn any-seat-occupied? []
  (< @free-seats 3))

    (if @continue-running
      (let [time (+ 10 (rand-int 20))]
        (Thread/sleep time)
        (swap! free-seats try-occupy)
        (recur)))))

(future (move-to-chair))
