WeBWorK Problems

Correct answer is either a string or a function

Re: Correct answer is either a string or a function

by Danny Glin -
Number of replies: 0
Yup, that link covers it. I looked around the wiki, but didn't happen to come across that page.
The solution is
ANS($ans->cmp(typeMatch=>Formula("x*y")));
This way it still gives errors if the student answer isn't either an allowable string or a function of x and y.
Thanks.