add modulo koan (Kernel.rem/2)
This commit is contained in:
@@ -20,6 +20,10 @@ defmodule Numbers do
|
|||||||
assert div(5, 2) == ___
|
assert div(5, 2) == ___
|
||||||
end
|
end
|
||||||
|
|
||||||
|
koan "What remains or: The Case of the Missing Modulo Operator (%)" do
|
||||||
|
assert rem(5, 2) == ___
|
||||||
|
end
|
||||||
|
|
||||||
koan "Other math operators may produce this" do
|
koan "Other math operators may produce this" do
|
||||||
assert 2 * 2 === ___
|
assert 2 * 2 === ___
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ defmodule NumbersTests do
|
|||||||
false,
|
false,
|
||||||
1.0,
|
1.0,
|
||||||
2,
|
2,
|
||||||
|
1,
|
||||||
4,
|
4,
|
||||||
4.0,
|
4.0,
|
||||||
false,
|
false,
|
||||||
|
|||||||
Reference in New Issue
Block a user