case {1, 2} do
{3, 4} ->
"This clause won't match."
{1, x} ->
"This clause will match and bind x to 2 in this clause."
_ ->
"This clause would match any value."
end
case
is only used to match the given pattern of the particular data. Here , {1,2}
is matching with different case pattern that is given in the code example.