read or learn more
λ λ λ
Fogus' Thoughts on life, programming, and thinking
❤ c clj erl pl frink fth cl org pure icl qi ❤
Follow me on Twitter... or RSS...
Run this blog in mobile
2024 2023 2022 2021 2020 2019 2018 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2004 2003 2002
Say you have a namespace a that needs to be tested: 1 (ns a) (defn ^{:private true} foo [] 42) Using Clojure’s clojure.test libs you might think it would be as simple as the following: (ns b (:use [clojure.test :only [deftest is]])) (deftest test-foo (is (= 42 (a/foo)))) ; java.lang.IllegalStateException: var: #’a/foo is not public […]
A slight modification to Clojure’s comp
function gives me more power…
I’ve at times found the need to use the precise match form of Clojure’s multimethod dispatch value — so created a macro to make it a little easier.
Continue