improved error message for forall, added tests for map function