Let's take this simple function:
@spec laBionda(String.t()) :: String.t()
def laBionda(name \\ "you") when is_bitstring(name) do
"One for #{name}, one for me"
end
I only want to define the function for String inputs.
Should I use is_bitstring
or is_binary
on the Guard? Are there any differences? Both seem to be fine in that case.