Typesafe equality operator.
Typesafe equality operator.
This method is similar to == except that it only allows two OneAnd[F, A] values to be compared to each other, and uses equality provided by Eq[_] instances, rather than using the universal equality provided by .equals.
Append another OneAnd to this
Check whether at least one element satisfies the predicate.
remove elements not matching the predicate
find the first element matching the predicate, if one exists
Left-associative fold on the structure using f.
Right-associative fold on the structure using f.
Check whether all elements satisfy the predicate.
Applies f to all the elements of the structure
Typesafe stringification method.
Typesafe stringification method.
This method is similar to .toString except that it stringifies values according to Show[_] instances, rather than using the universal .toString method.
Combine the head and tail into a single F[A]
value.
A data type which represents a single element (head) and some other structure (tail). As we have done in package.scala, this can be used to represent a List which is guaranteed to not be empty: