Elixir: Boolean and logic
🚧 In development
Instructions
🚧 In development
If you've reached a deadlock it's time to ask your question in the «Discussions». How ask a question correctly:
- Be sure to attach the test output, without it it's almost impossible to figure out what went wrong, even if you show your code. It's complicated for developers to execute code in their heads, but having a mistake before their eyes most probably will be helpful.
Your exercise will be checked with these tests:
defmodule Test do
use ExUnit.Case
test "any?" do
assert false == Solution.any?(false, false, false, false)
assert true == Solution.any?(true, false, false, false)
assert true == Solution.any?(false, true, false, false)
assert true == Solution.any?(false, false, true, false)
assert true == Solution.any?(false, false, false, true)
assert true == Solution.any?(false, true, false, true)
end
test "truthy?" do
assert 42 == Solution.truthy?(true, 42)
assert [42] == Solution.truthy?(1, [42])
assert false == Solution.truthy?("hello", false)
assert nil == Solution.truthy?("", nil)
end
endTeacher's solution will be available in:
20:00
