Skip to content

Instantly share code, notes, and snippets.

(ns clotp.core
(:require [clojure.core.match :refer [match]]))
(def next-process-id (atom 0))
(def processes (atom {}))
(defn next-pid []
(swap! next-process-id inc))
(defn spawn [f & args]
(ns clotp.core
(:require [clojure.core.match :refer [match]]))
(def next-process-id (atom 0))
(def processes (atom {}))
(defn next-pid []
(swap! next-process-id inc))
(defn spawn [f & args]
(ns dire-examples.core
(:require [dire.core :refer [with-precondition! with-postcondition!]]))
(defn save-user [& {:keys [username email password state]}]
"Persist the user to a database here."
:ok ;Or :not-ok
)
(with-precondition! #'save-user
:legal-username-length