fromPredicateK<T> function
Wrapper around fromPredicate that can be curried with the value.
final greaterThanTwo = fromPredicateK((int i) => i > 2);
expect(greaterThanTwo(3), some(3));
expect(greaterThanTwo(1), none());
Implementation
Option<T> Function(T value) fromPredicateK<T>(
bool Function(T value) predicate,
) =>
(value) => fromPredicate(value, predicate);