Today I Learned

hashrocket A Hashrocket project

Argument Requirements For A Function

When defining a function, you must declare one or more function definitions, each of which will require a different set of arguments. These argument lists are stored as metadata for the function. So, if you are trying to figure out what arity a function is or what variations of arguments it takes, you can check the metadata like so:

> (:arglists (meta #'str))
([] [x] [x & ys])


See More #clojure TILs