This commit is contained in:
Chang CL
2025-09-16 19:39:52 +08:00
parent f63288fd8f
commit 0f16e43b98
2 changed files with 4 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ defmodule Numbers do
end
koan "I want the first and last in the range" do
first..last = Range.new(1, 10)
first..last//_ = Range.new(1, 10)
assert first == 1
assert last == 10

View File

@@ -5,15 +5,15 @@ defmodule Tuples do
@intro "Tuples"
koan "Tuples can contain different things" do
assert {:a, 1, "hi"} == ___
assert {:a, 1, "hi"} == {:a, 1, "hi"}
end
koan "Tuples have a size" do
assert tuple_size({:a, :b, :c}) == ___
assert tuple_size({:a, :b, :c}) == 3
end
koan "You can pull out individual elements" do
assert elem({:a, "hi"}, 1) == ___
assert elem({:a, "hi"}, 1) == "hi"
end
koan "You can change individual elements of a tuple" do