atom
An atom represents a unique, immutable symbolic identifier. Atoms are often used for tags, labels, enumeration values, or lightweight identifiers that do not require the full semantics of strings. Atoms are compared by identity rather than by content.
Syntax
Atoms are written using a leading colon : followed by an identifier:
:foo:help:my-atom:🐦:Δt
Atom names may be any valid identifier, including Unicode characters.
Kind
The kind of an atom is itself:
<:foo><:help><:my-atom><:🐦><:Δt>
Construction
Atoms can be constructed using the colon syntax:
tag1:=:starttag2:=:endstatus:=:pending
Identity
Two atoms with the same name are identical:
a:=:foob:=:fooa⩵b
This evaluates to true because both a and b refer to the same atom :foo.
Enums
Atoms are commonly used to define enumeration values:
<status>:=pending|active|completed|failedcurrent<status>:=:status/pending