Trying to learn Haskell, so I rewrote my first program from CS300