Skip to content

Instantly share code, notes, and snippets.

(defmacro safe-agent [& body]
`(try
~@body
(catch Exception e#
(log [:agent :error] {:exception (str e#)
:agent (with-out-str (pr @*agent*))})
@*agent*)))
@cark
cark / gist:249761
Created December 5, 2009 16:59 — forked from offby1/gist:249755
(ns anagrams
(:use [clojure.contrib.str-utils])
(:require [clojure.contrib.str-utils2 :as su])
(:use [clojure.test]))
(set! *warn-on-reflection* true)
(defn contains-vowel? [w]
(some #(su/contains? w %)
(list "a" "e" "i" "o" "u" "y")))