Add other lessons that don't work with answer system

This commit is contained in:
Jay Hayes
2016-05-04 19:13:37 -05:00
parent 53fc465c3f
commit 7b64bd36e9
2 changed files with 18 additions and 0 deletions

View File

@@ -19,6 +19,22 @@ defmodule Atoms do
assert list[:name] == ___
end
#koan "Only atom keys may be accessed with dot syntax" do
# map = %{name: "Jay"}
# assert map.name == ___
# map = %{"name" => "Jay"}
# assert_raise KeyError, fn -> ___ end
# assert map["name"] == ___
#end
#koan "Dot syntax is stricter than access with brackets" do
# map = %{name: "Jay"}
# assert map[:age] == ___
# assert_raise KeyError, fn -> ___ end
#end
koan "It is surprising to find out that booleans are atoms" do
assert is_atom(true) == ___
assert is_atom(false) == ___