I'm new to Clojure and finding my sea legs. I was wondering whether it is considered good or bad practice, from a functional programming standpoint, to put functions in Clojure maps and then pass those maps around like quasi-objects, as is often done in JavaScript. Explanations will also be appreciated.
Do it, if it makes your code shorter or easier to understand, or test, or debug.
Or if you'd just like to. Trust your judgement.
Clojure's multimethods are essentially maps of functions, so no, it's not a bad idea at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With