[Haskell-beginners] How best to do this?