Browse files

prevent repeated requires in dispatch function

  • Loading branch information...
1 parent ecdb4b2 commit 360cae327a774708622ba56d53ea7d378fce9977 @ninjudd ninjudd committed Nov 21, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/useful/dispatch.clj
View
3 src/useful/dispatch.clj
@@ -13,7 +13,8 @@
namespace and function to call."
[dispatch-fn & options]
(let [{:keys [hierarchy wrap default]} (into-map options)
- wrap (or wrap identity)]
+ wrap (or wrap identity)
+ require (memoize require)]
(fn [& args]
(let [fname (apply dispatch-fn args)
default (or default

0 comments on commit 360cae3

Please sign in to comment.