Skip to content

Instantly share code, notes, and snippets.

@chris-martin
Created January 25, 2017 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris-martin/a4a69d1f938ffcda0a738419311d4431 to your computer and use it in GitHub Desktop.
Save chris-martin/a4a69d1f938ffcda0a738419311d4431 to your computer and use it in GitHub Desktop.
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