Std.NonEmpty.groupBy
1 declaration
fn
groupBy: &Array[T] -> fn(T, T) -> Bool -> Array[Std.NonEmpty.NonEmpty[T]]This is a callable function.
What it does
Adjacent equal elements gathered, each group non-empty by construction.
This is what the type is for: List.group answers arrays that are known to
hold at least one element, and had no way to say so.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- & borrows a value for this call instead of moving or copying it.
- Names inside [ ] are type arguments, such as the item type held by a collection.
