User Portlet User Portlet

Discussions
What is it about Plus that accounts for this behavior (note the middle (non)match)? [mcode]In[228]:= ClearAll[Bar];           x = Plus[Bar[1, 2], Bar[3, 4]];  In[230]:= MatchQ[x, Plus[_Bar, _]] Out[230]= True In[231]:= MatchQ[x, Plus[_Bar, _Bar]]...
Another way to skin the cat... [mcode]In[62]:= good = {{{"foo"}, {0, 1, 0, 0}}}; bad1 = {{{"foo"}, {0, 0, 0, 0}}}; bad2 = {{{"foo"}, {0, "foo", 0, 0}}}; In[79]:= testQ = MatchQ[#, {__?NumberQ}] && ! MatchQ[#, {0 ..}] &; testQ /@ (Last /@ Last /@...