We use defmulti to dispatch API actions on a map key. To avoid needing to wrap that defmulti in a normal function, so that it can be used as a Reitit ring handler, these two protocols need to be extended. In the sample code below, all I did was repeat the clojure.lang.Fn implementation.
We use
defmulti
to dispatch API actions on a map key. To avoid needing to wrap thatdefmulti
in a normal function, so that it can be used as a Reitit ring handler, these two protocols need to be extended. In the sample code below, all I did was repeat theclojure.lang.Fn
implementation.