hi, I'm interested in what techniques are useful for adding functionality to multimethods without modifying the defmethod itself. A while back I asked a similar question [1] and there are good answers there, but recently I've been looking at simple concepts like Ring middleware and wrapping functions with functions defining :pre and :post conditions, and now wonder if there isn't a similar idea for multimethods.
My code is a basic socket server with a defmulti that dispatches based on whether the socket is ready to accept, read, etcetera. I would like to add behavior to the defmethods in a simple and composable way and keep concerns separate (for example separating reading a socket from checking if it's actually closed). Here's a paste, https://www.refheap.com/paste/11861. thanks, George [1] https://groups.google.com/forum/?fromgroups=#!searchin/clojure/george$20before$20after/clojure/beqWiVSn8ws/CihDwDumLDQJ -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.