axelson
13
I believe what @hauleth was driving at is that you can restructure that code as
def handle_has_key(true), do: b
def handle_has_key(false), do: c
def main do
handle_has_key(Map.key?(a))
end
i.e. pass the result of the check into the function
Of course, I’m not advocating to write all your code in this manner, just pointing out that it is possible