Skip to content

Instantly share code, notes, and snippets.

@jjcomer
jjcomer / kahn.clj
Created May 10, 2013 18:25 — forked from alandipert/kahn.clj
Use disj
(use '[clojure.set :only (difference union intersection)])
(defn without
"Returns set s with x removed."
[s x] (disj s x))
(defn take-1
"Returns the pair [element, s'] where s' is set s with element removed."
[s] {:pre [(not (empty? s))]}
(let [item (first s)]