Pattern-matching would be done with case rather than cond:
case x do
{_, 1} -> "hello"
_ -> ...
end
cond is more like a chain of if/else if
Pattern-matching would be done with case rather than cond:
case x do
{_, 1} -> "hello"
_ -> ...
end
cond is more like a chain of if/else if