I have been running into the term coll, and have just been assuming it means collection or list. But we all know what they say about assuming. Just looking for a little clarification.
Yes, coll
is a common name for a collection parameter in clojure code.
Here's the list of idiomatic names from the (unofficial) Clojure Style Guide:
in functions:
- f, g, h - function input
- n - integer input usually a size
- index, i - integer index
- x, y - numbers
- xs - sequence
- m - map
- s - string input
- re - regular expression
- coll - a collection
- pred - a predicate closure
- & more - variadic input
- xf - xform, a transducer
in macros:
- expr - an expression
- body - a macro body
- binding - a macro binding vector
There's a similar but shorter list in the Library Coding Standards page in the clojure developers wiki. While not every clojure developer agrees on their entire contents, both are good readings. Just take them with a grain of salt: "rules are made to be broken"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With