clamp function in base

Henning Thielemann lemming at henning-thielemann.de
Sun Aug 16 09:43:20 UTC 2020


On Fri, 14 Aug 2020, Sandy Maguire wrote:

> It seems to me that base is missing the very standard function `clamp :: Ord a => a -> a -> a -> a`:
> 
> ```haskell
> clamp :: Ord a => a -> a -> a -> a
> clamp low high = min high .max low
> ```


https://hackage.haskell.org/package/utility-ht-0.0.15/docs/Data-Ord-HT.html#v:limit


More information about the Libraries mailing list