Attempt to create an equivalent of Haskell's 'where' construct in scala.