20 lines
370 B
Elixir
20 lines
370 B
Elixir
|
defmodule Lasagna do
|
||
|
def expected_minutes_in_oven(), do: 40
|
||
|
|
||
|
def remaining_minutes_in_oven(minutes) do
|
||
|
expected_minutes_in_oven() - minutes
|
||
|
end
|
||
|
|
||
|
def preparation_time_in_minutes(layers) do
|
||
|
layers * 2
|
||
|
end
|
||
|
|
||
|
def total_time_in_minutes(layers, duration) do
|
||
|
preparation_time_in_minutes(layers) + duration
|
||
|
end
|
||
|
|
||
|
def alarm() do
|
||
|
"Ding!"
|
||
|
end
|
||
|
end
|