Created
January 25, 2017 21:21
-
-
Save chris-martin/a4a69d1f938ffcda0a738419311d4431 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance Bounded Float where | |
minBound = -1/0 | |
maxBound = 1/0 | |
minimum' :: [Float] -> Float | |
minimum' = coerce . foldMap Min | |
maximum' :: [Float] -> Float | |
maximum' = coerce . foldMap Max | |
test = minimum' [] < maximum' [] | |
-- False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment