HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleutility-ht-0.0.17.2Haskell98

Data.Ord.HT

  • 3 values
valuelimit :: Ord a => (a, a) -> a -> a
#

limit (lower,upper) x restricts x to the range from lower to upper. Don't expect a sensible result for lower>upper.

Called clamp elsewhere.

valueinRange :: Ord a => (a, a) -> a -> Bool
#

limit (lower,upper) x checks whether x is in the range from lower to upper. Don't expect a sensible result for lower>upper.