diff options
author | Sandy Maguire <sandy@sandymaguire.me> | 2020-09-04 09:54:06 -0700 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-12 00:31:37 -0400 |
commit | fb6e29e8d19deaf7581fdef14adc88a02573c83e (patch) | |
tree | 553af51409f30e52145f9605adcd7b5fcfacfe83 /libraries/base/Data/Ord.hs | |
parent | fc965c0910757410d624229419f36f0829cf73f6 (diff) | |
download | haskell-fb6e29e8d19deaf7581fdef14adc88a02573c83e.tar.gz |
Add tests
Diffstat (limited to 'libraries/base/Data/Ord.hs')
-rw-r--r-- | libraries/base/Data/Ord.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/base/Data/Ord.hs b/libraries/base/Data/Ord.hs index 9815259dec..88c22798a7 100644 --- a/libraries/base/Data/Ord.hs +++ b/libraries/base/Data/Ord.hs @@ -52,6 +52,10 @@ comparing p x y = compare (p x) (p y) -- @low@ and @high@. If it is, @a@ is returned unchanged. The result -- is otherwise @low@ if @a <= low@, or @high@ if @high <= a@. -- +-- When clamp is used at Double and Float, it has NaN propagating semantics in +-- its second argument. That is, @clamp (l,h) NaN = NaN@, but @clamp (NaN, NaN) +-- x = x@. +-- -- >>> clamp (0, 10) 2 -- 2 -- |