links: [[Elixir MOC]] --- # Atoms An Atom is a constant whose value is its own name. Some other languages call these symbols. They often useful to enumerate over distinct values ```elixir variable = :an_atom ``` Atoms are equal if their names are equal ```elixir :apple == :apple # => true :apple == :orange # => false ``` Often they are used to express the state of an operation, by using values such as `:ok` and `:error` The boolean `true` and `false` are also atoms ```elixir true == :true # => true is_atom(false) # => true is_boolean(:false) # => true ``` --- tags: #elixir #atoms sources: - [Elixir Lang Basic Types Atoms](https://elixir-lang.org/getting-started/basic-types.html#atoms)