@adkron brought up an interesting point today; Case and cond statements could be better represented as multiple function heads.
for example:
case :foo do
{:ok, :bar} -> :baz
{:error, _} -> :bing
end
versus
private_fun(:foo)
....
defp private_fun({:ok, :bar}), do: :baz
defp private_fun({:error, _}), do: :bing
I am just wondering if one is more performant than the other. And also, which style is preferred.






















