We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c58fde5 + c87cf26 commit a6e0d50Copy full SHA for a6e0d50
src/Data/Lens/Fold.purs
@@ -114,7 +114,7 @@ maximumOf p = foldrOf p (\a -> Just <<< maybe a (max a)) Nothing where
114
-- | The minimum of all foci of a `Fold`, if there is any.
115
minimumOf :: forall s t a b. (Ord a) => Fold (Endo (Maybe a)) s t a b -> s -> Maybe a
116
minimumOf p = foldrOf p (\a -> Just <<< maybe a (min a)) Nothing where
117
- min a b = if a > b then a else b
+ min a b = if a < b then a else b
118
119
-- | Find the first focus of a `Fold` that satisfies a predicate, if there is any.
120
findOf :: forall s t a b. Fold (Endo (Maybe a)) s t a b -> (a -> Boolean) -> s -> Maybe a
0 commit comments