Thanks Sean and Meikel. I tightened up the function a bit as a single function with multiple arglist: ---------- (defn clear-cached-files3 ([] (dosync (alter file-seq-cache empty))) ([& ks] (dosync (dorun (for [key ks] (alter file-seq-cache dissoc key)))) @file-seq-cache)) ----------
I didn't want the dissoc to be lazy (I'd never expect the list to be that long). On Sun, Oct 4, 2009 at 5:42 AM, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi, > > I second Sean's view: dispatching a multimethod on argument count is > possible, but maybe not the clearest use of multimethods. I would also > prefer the multiple arglist approach. > > Am 03.10.2009 um 21:39 schrieb Sean Devlin: > > (defn reduce >> ([f coll] (reduce f (first coll) (rest coll))) >> ([f init coll] (reduce stuff...))) >> > > Note, that the first reduce call can also simply be written as (reduce f > coll). > > Sincerely > Meikel > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---