Don't use a separate function for this.  There is none for Haskell either.  Instead, just put the body of this function right into the `eval`.