clojure

Vars

Syntax#

  • (def symbol value)
  • (def symbol “docstring” value)
  • (declare symbol_0 symbol_1 symbol_2 …)

Remarks#

This should not be confused with (defn), which is used for defining functions.

Types of Variables

There are different types of variables in Clojure:

  • numbers

    Types of numbers:

    • integers
    • longs (numbers larger than 2^31 - 1)
    • floats (decimals)
  • strings

  • collections

    Types of collections:

    • maps
    • sequences
    • vectors
  • functions


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow