List.starts_with-question-mark
You're seeing just the function
starts_with-question-mark
, go back to List module for more information.
Specs
starts_with?([...], [...]) :: boolean()
starts_with?(list(), []) :: true
starts_with?([], [...]) :: false
Returns true
if list
starts with the given prefix
list; otherwise returns false
.
If prefix
is an empty list, it returns true
.
Examples
iex> List.starts_with?([1, 2, 3], [1, 2])
true
iex> List.starts_with?([1, 2], [1, 2, 3])
false
iex> List.starts_with?([:alpha], [])
true
iex> List.starts_with?([], [:alpha])
false