Skip to content

Instantly share code, notes, and snippets.

View filipesilva's full-sized avatar

Filipe Silva filipesilva

  • Dublin, Ireland
View GitHub Profile
(ns pie-a-la-mode
(:require [clojure.core.async :as a]))
;; Concurrency example from The Pragmatic Programmers. Waiters check if there's
;; enough pie and ice cream before they sell an order, but if they don't
;; coordinate it's still possible to sell more than we have.
;;
;; The below code should return either :ok or :not-available for a given order.
(def recipes