Improve some descriptions a little bit

This commit is contained in:
Uku Taht
2016-03-20 20:31:48 +00:00
parent bd5972a867
commit 7ee7514192
4 changed files with 13 additions and 18 deletions

View File

@@ -1,35 +1,35 @@
defmodule Tuples do
use Koans
koan "tuples have a size" do
koan "Tuples have a size" do
assert tuple_size({:a, :b, :c}) == :__
end
koan "tuples can contain different things" do
koan "Tuples can contain different things" do
assert {:a, 1, "hi"} == :__
end
koan "you can pull out individual elements" do
koan "You can pull out individual elements" do
assert elem({:a, "hi"}, 1) == :__
end
koan "you can change individual elements of a tuple" do
koan "You can change individual elements of a tuple" do
assert put_elem({:a, "hi"}, 1, "bye") == :__
end
koan "you can also simply extend a tuple with new stuff" do
koan "You can also simply extend a tuple with new stuff" do
assert Tuple.insert_at({:a, "hi"}, 1, :new_thing) == :__
end
koan "add things at the end" do
koan "Add things at the end" do
assert Tuple.append({"Huey", "Dewey"}, "Louie") == :__
end
koan "or also remove them" do
koan "Or remove them" do
assert Tuple.delete_at({:this, :is, :not, :awesome}, 2) == :__
end
koan "turn it into a list in case you need it" do
koan "Turn it into a list in case you need it" do
assert Tuple.to_list({:this, :can, :be, :a, :list}) == :__
end
end