Enum.take_while
You're seeing just the function
take_while
, go back to Enum module for more information.
Specs
take_while(t(), (element() -> as_boolean(term()))) :: list()
Takes the elements from the beginning of the enumerable
while fun
returns
a truthy value.
Examples
iex> Enum.take_while([1, 2, 3], fn x -> x < 3 end)
[1, 2]