Is a collective suitable for a collection in clojure?
1 answer
Yes, coll
this is the common name for the collection parameter in the clojure code.
Here's a list of idiomatic names from the (unofficial) Clojure Style Guide :
in functions:
- f, g, h - function input
- n - the integer input is usually the size
- index, i am an integer index
- x, y - numbers
- xs - sequence
- m - map
- s - string input
- regular expression
- coll - collection
- pred - predicate closure
- & more - variational input
- xf - xform, transformer
in macros:
- expression - expression
- body - macro body
- binding - the binding vector of the macro
The clojure developer wiki has a similar but shorter list on the Library Coding Standards page . While not every clojure developer agrees with their content, both are good readings. Just take them with a grain of salt: "the rules are broken"
+11
source to share