For your use-case , I would prefer cond
def do_something(attribute) do
bar = get_bar(attribute)
baz = get_baz(bar)
len = length(second)
cond do
baz==12381 -> {:ok, :ignored}
len > 100 -> {:ok, :ignored}
first==first and second==second and third==third -> ExternalService.call(first, second, third)
true -> <your default behaviour if nothing matches>
end
end


















