DOCUMENT(); loadMacros( "PGstandard.pl", "PGML.pl", "contextArbitraryString.pl", ); TEXT(beginproblem()); # https://webwork.maa.org/moodle/mod/forum/discuss.php?d=2950 Context("Numeric"); Context()->strings->add( alpha => {caseSensitive => 1}, beta => {caseSensitive => 1}, gamma => {caseSensitive => 1}, delta => {caseSensitive => 1}, ); Context()->parens->set("{" => {type => "List", removable => 0}); $answer1 = Compute("{alpha,beta,gamma}"); $answer2 = Compute("{alpha,beta}, {gamma,delta}"); BEGIN_PGML # Answer is a set of strings or several sets of strings Using set notation, what is the set of the first three letters of the Greek alphabet in their natural order? [__________________]{$answer1->cmp(list_type=>"set", removeParens=>0, implicitList=>0, showParenHints=>1, ordered=>1)} Note: [| {beta, alpha, gamma} |] is marked incorrect (as expected). Enter [| {alpha,beta}, {gamma,delta} |] [_____________________]{$answer2->cmp(list_type=>"set", removeParens=>0, implicitList=>0, showParenHints=>1)} Note: [| {gamma,delta}, {alpha,beta} |] is marked correct, but [| {delta,gamma}, {alpha,beta} |] is not marked correct (not as expected). END_PGML ENDDOCUMENT();