Skip to content
jonase edited this page Mar 6, 2012 · 2 revisions

Please add your ideas to this list

  • remove instead of filter
     (filter (complement ?pred) ?coll) | 
     (filter #(not (?pred ?x)) ?coll)  | => (remove ?pred ?coll)
  • proxy when reify would suffice

  • unnecessary anonymous functions

  (fn [. ?arg] (?fun . ?arg))    |
  (fn* [. ?args] (?fun . ?args)) | => ?fun

as in (map #(inc %) coll) => (map inc coll)

Clone this wiki locally