Remove RenderType datatype
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
module FoldableHelp
|
||||
( safeMinimumOn
|
||||
, module Data.Foldable
|
||||
)
|
||||
where
|
||||
import Data.Foldable
|
||||
|
||||
safeMinimumOn :: (Foldable t,Ord b) => (a -> b) -> t a -> Maybe a
|
||||
safeMinimumOn f = foldl' g Nothing
|
||||
where
|
||||
g (Just x) y
|
||||
| f x < f y = Just x
|
||||
| otherwise = Just y
|
||||
g Nothing y = Just y
|
||||
Reference in New Issue
Block a user