Want to learn?

Atoms

Representation

Documentation

An atom is a constant which name is its value. Every atom starts with colon and ends with word or operator known for Elixir. Things to remember when creating an atom:

  • must be a sequence of UTF-8 letters,

  • might consist of digits,

  • might include the underscore,

  • might include @,

  • might end with ? or !,

  • can be created with any string when enclosed within quotes.

Example of atoms:

:hello, :"hello world", :+, :===, :exists?

Two atoms with the same naming always represent the same value.

iex> :hello == :hello
true
iex> :hello == :"hello"
true
iex> :hello == :"hello world"
false

You can check if given value is atom with is_atom/1 function:

iex> is_atom :hello
true
iex> is_atom "hello"
false
iex> is_atom :"hello"
true

You'll be using atoms very often to tag values.

Check our latest product - built from our experience helping growing businesses navigate complex compliance requirements without enterprise budgets.

humadroid.io is an affordable, all-in-one GRC platform designed for small and medium-sized businesses pursuing SOC 2 or ISO 27001 compliance. Our AI-powered compliance assistant understands your business context and transforms complex compliance work into actionable steps - generating tailored policy documentation in minutes instead of weeks, and helping draft your SOC 2 System Description in a fraction of the usual time. At just $250/month with no hidden fees or user limits, customers save 10-15 hours per week on compliance work.

Explore humadroid.io
Top

Contact us

* Required fields

The controller of your personal data provided via this contact form is Prograils sp. z o.o., with a registered seat at Sczanieckiej 9A/10, 60-215 PoznaƄ. Your personal data will be processed in order to respond to your inquiries and for our marketing purposes (e.g. when you ask us for our post-development, maintenance or ad hoc engagements for your app). You have the rights to: access your personal data, rectify or erase your personal data, restrict the processing of your personal data, data portability and to object to the processing of your personal data. Learn more.

Notice

We do not track you online. We use only session cookies and anonymous identifiers for the purposes specified in the cookie policy. No third-party trackers.

I understand
Elo Mordo!Elo Mordo!