Skip to content

Commit

Permalink
Establish that modules are atoms, then show function call on them
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvery committed May 5, 2016
1 parent 948fbdd commit ad011d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions lib/koans/03_atoms.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ defmodule Atoms do

koan "Modules are also atoms" do
assert is_atom(String) == ___
assert :"Elixir.String" == ___
assert :"Elixir.String".upcase("hello") == ___
end

koan "Atoms are used to access Erlang" do
assert :erlang.is_list([]) == ___
assert :lists.sort([2, 3, 1]) == ___
koan "Functions can be called on the atom too" do
assert :"Elixir.String" == String
assert :"Elixir.String".upcase("hello") == ___
end
end
4 changes: 2 additions & 2 deletions test/koans/atoms_koans_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ defmodule AtomsTests do
:human,
{:multiple, [:atomized, "stringified"]},
{:multiple, [true, true, true, false]},
{:multiple, [true, String, "HELLO"]},
{:multiple, [true, [1,2,3]]},
true,
"HELLO",
]

test_all(Atoms, answers)
Expand Down

0 comments on commit ad011d8

Please sign in to comment.