, comma

special charactersince v0.0-927 in clojure in ednEdit

Commas are ignored and can be used for assisting readability.

  • [1, 2, 3] => [1 2 3]
  • {:a 1, :b 2} => {:a 1 :b 2}

Details:

A comma is treated as whitespace when appearing outside a string.

This is mainly used to help delineate elements in a collection when necessary.

Commas are used when printing maps in the REPL:

{:foo 1, :bar 2, :bar 3}

Examples:

[1, 2, 3, 4]
;;=> [1 2 3 4]

{:foo :bar :baz :quux}
;;=> {:foo :bar, :baz :quux}