Skip to content

Instantly share code, notes, and snippets.

View tauzen's full-sized avatar

Krzysztof Mioduszewski tauzen

View GitHub Profile
@tauzen
tauzen / barber.clj
Created July 27, 2019 18:57
7 languages in 7 weeks, Clojure day 3, sleeping barber
(def cut-count (atom 0))
(def client-count (atom 0))
(def cutting (atom false))
(def client-approaching (atom false))
(def client-queue (atom []))
(defn cut [client-id]
(reset! cutting true)
(future