Skip to content

Instantly share code, notes, and snippets.

@deidyomega
Last active September 18, 2020 21:51
Show Gist options
  • Save deidyomega/fad42bb4e526718608e98fd25b20c65e to your computer and use it in GitHub Desktop.
Save deidyomega/fad42bb4e526718608e98fd25b20c65e to your computer and use it in GitHub Desktop.
get_winner :: (Integer, Integer) -> Integer
get_winner (first, second)
| first > second = 1
| first < second = -1
| otherwise = 0
main = do
print $ get_winner $ (21, 52)
-- main.hs:40:1: error:
-- • Couldn't match expected type ‘IO t0’ with actual type ‘Integer’
-- • In the expression: main
-- When checking the type of the IO action ‘main’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment