... if I continue to work with default values I am required to introduce a function head since I use claues with default values:
def area(:rectangle, length \\ 1, width \\ 1) do
length * width
end
== Compilation error on file lib/geom.ex ==
** (CompileError) lib/geom.ex:15: def area/3 has default values and multiple clauses, define a function head with the defaults
lib/geom.ex:15: (module)
(stdlib) erl_eval.erl:669: :erl_eval.do_apply/6
I have trouble with introducing the function head since this does not work:
... if I continue to work with default values I am required to introduce a function head since I use claues with default values:
I have trouble with introducing the function head since this does not work: