Joseph Wright writes:
 > Will Robertson wrote:
 > > Hi,
 > > 
 > > I've been thinking more about this.
 > > Just so we're clear, what you're looking for is a function that can be
 > > given a token list and return true or false depending if, without
 > > expansion, the list contains a quark.
 > I was thinking on a much less grand scale.  Currently, you can test if
 > tlp contains a quark (usually q_no_value).  However, the moment you
 > create a second quark to indicate something else (lets say
 > q_value_required) you always need two tests.  If you have more
 > possibilities, the number of tests rises.  Of course, you are probably
 > using these quarks separately, but in some places you may need a simple
 > "Is it a quark? yes/no" test.

well, first of all, quarks are really made to be extremely fast in testing
(though the need for this might vanish over time more and more) but
essentially testing something for being one of three quarks isnt that bad.

however, if you are really only interested in "is the token in #1 any quark"
then you can do this (using the defining feature of a quark):

 \if_meaning:NN \l_quark_test_tlp #1 ...

assuming that #1 has picked up a token which may or may not be a quark

is that what you are looking for?