[Haskell-beginners] help understanding error from attempt at CIS 194 : Homework 7 - indexJ