On Wed, Nov 10, 2010 at 6:59 AM, Pepijn de Vos <pepijnde...@gmail.com> wrote: > Hi all, > > It occurred to me that Clojure has a huge core namespace. While OO languages > like Python and Java stuff functions into modules and objects and have a core > of a few dozen functions, Clojure's core contains everything you might need > for most tasks, but has over 400 functions in core, with no easy way to > navigate them.
How many methods, total, are in the java.lang classes, I wonder? Or functions in the C standard library, or the C++ STL. > To solve this problem I'm writing a decision tree to interactively find the > function you need by doing sort of a 20 questions game. > > With some closure and higher-order function magic I was able to create a > function to express this tree in code easily, by supplying a question, a > predicate and 2 possible followup questions. > > https://github.com/pepijndevos/clj-fneeid/blob/master/src/fneeid.clj > > The problem is to come up with sensible questions to ask. Even after doing > Clojure for quite a while I don't even know half of clojure.core, let alone > being able to categorize all functions with sensible questions. > > This is what I have so far. It would be awesome if you could suggest me some > good questions, kill the crappy ones, or maybe even come up with creative > introspection predicates, or sets of fns that fit a question. An interesting idea, though I'm not sure it buys much over apropos, doc, and the "cheat sheet" at the main website. -- 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