redo in Haskell(from "Haskell from scratch" video series)