Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
defmodule Short_circuit do
|
||||
defp a(bool) do
|
||||
IO.puts "a( #{bool} ) called"
|
||||
bool
|
||||
end
|
||||
|
||||
defp b(bool) do
|
||||
IO.puts "b( #{bool} ) called"
|
||||
bool
|
||||
end
|
||||
|
||||
def task do
|
||||
Enum.each([true, false], fn i ->
|
||||
Enum.each([true, false], fn j ->
|
||||
IO.puts "a( #{i} ) and b( #{j} ) is #{a(i) and b(j)}.\n"
|
||||
IO.puts "a( #{i} ) or b( #{j} ) is #{a(i) or b(j)}.\n"
|
||||
end)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
Short_circuit.task
|
||||
Loading…
Add table
Add a link
Reference in a new issue