Remove RenderType datatype

This commit is contained in:
jgk
2021-07-30 11:53:51 +02:00
parent c67feb485f
commit 834464db51
31 changed files with 164 additions and 227 deletions
+14
View File
@@ -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