Why scalaz.NonEmptyList does not support general list operations such as "find",

I have an instance NonEmptyList, and I want to find (in order) the first element that matches the predicate. With scalas, ListI can do it myList.find(predicate), however scalaz NonEmptyListdoes not support such an operation, so this does not work here.

Why is this?

Is there a better way than doing myNonEmptyList.toList.find(predicate)?

+4
source share

Source: https://habr.com/ru/post/1619882/


All Articles