Hi Jeremy - I am finding "new-to-me" functions like that all the time, even after 3 years of Clojure! Besides looking up and understanding unfamiliar functions (e.g. ffirst [1]), I also keep a browser tab always open to the clojure cheatsheet [2] as a reference. Periodically (or if I need a break from other work) I'll just randomly scan one section and try to make sure I remember & understand the different functions. It also helps to review all of the examples linked from the Cheatsheet through ClojureDocs.org (for example, does (map? [1 2 3]) return true for vectors since they are associative?).
Also, please feel free to update or add to the entries at ClojureDocs.org when you find something confusing or missing! Cheers, Alan P.S. I have sometimes searched in vain for Clojure functions that I was certain must exist, only to find out they didn't exist. I created the Tupelo library (https://github.com/cloojure/tupelo) to fill in the gaps. Enjoy! [1] When I first encountered ffirst, I thought it was a typo! [2] My favorite version: http://jafingerhut.github.io/cheatsheet/clojuredocs/cheatsheet-tiptip-cdocs-summary.html On Thu, Mar 3, 2016 at 10:33 AM, Jeremy Vuillermet < jeremy.vuiller...@gmail.com> wrote: > Hello, > > Every time I go to a code base I don't know, I discover new functions from > clojure api that I was not aware of. > Those are usually simple shortcut functions that don't do much but make > the code shorter. > > Just doing a research on this group for "shorter code" and "better code" > there are some cases like that. > For example (first (first mycoll)) can be shortened with (ffirst mycoll). > There are so many place, as a relatively new clojure programmer, where I > could shorten code like that. > > So my question is : Do we have a tool where we can copy/paste some code or > link github repo to find those opportunities for improvement. > > If no, would it be hard to make such a tool ? Does this need regex or > dealing with the ast ? > > Thanks > Jeremy > > -- > 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/d/optout. > -- 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/d/optout.