Skip to content

Instantly share code, notes, and snippets.

@MichaelDrogalis
Created August 2, 2013 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichaelDrogalis/6140936 to your computer and use it in GitHub Desktop.
Save MichaelDrogalis/6140936 to your computer and use it in GitHub Desktop.
(ns mytask
(:require [dire.core :refer [with-precondition!]]))
(defn add-one [n]
(inc n))
(with-precondition! #'add-one
:not-two
(fn [n & args]
(not= n 2)))
(add-one 2) ; => Boom!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment