17 lines
421 B
Clojure
17 lines
421 B
Clojure
(ns Atom
|
|
"Elixir Atom module — atom operations.
|
|
|
|
In CljElixir: (Atom/to-string :hello), etc.
|
|
Atoms are constants whose value is their name.")
|
|
|
|
(defn to-string
|
|
"Converts an atom to a string.
|
|
(Atom/to-string :hello) ;=> \"hello\"
|
|
(Atom/to-string :Elixir.MyModule) ;=> \"Elixir.MyModule\""
|
|
[atom])
|
|
|
|
(defn to-charlist
|
|
"Converts an atom to a charlist.
|
|
(Atom/to-charlist :hello) ;=> 'hello'"
|
|
[atom])
|