Files
elixir-koans/lib/koans/04_atoms.ex
Ahmed Ismail edf50fdf80 Add credo to the project and:
- Run mix credo --all to identify possible code optimizations
 - Resolve most of the errors generated by credo such as:
   - Numbers larger than 9999 should be written with underscores: 58_127
   - Modules should have a @moduledoc tag
   - Comparison will always return true
2023-11-10 00:57:21 +05:00

24 lines
492 B
Elixir

defmodule Atoms do
@moduledoc false
use Koans
@intro "Atoms"
koan "Atoms are constants where their name is their own value" do
adam = :human
assert adam == ___
end
koan "It is surprising to find out that booleans are atoms" do
assert is_atom(true) == ___
assert is_boolean(false) == ___
assert true == ___
assert false == ___
end
koan "Like booleans, the nil value is also an atom" do
assert is_atom(nil) == ___
assert nil == ___
end
end