Hello, > Can someone show me or point me to some code where the peek functions > have been used (preferably in a straightforward way)? I'm thinking in > particular of functions like \peek_charcode:NTF. Two packages seem to use these peek functions a lot: mhchem and pkgloader. One thing I note is that both packages involve constructions reminiscent of a case statement: \peek_charcode:NTF M { \mypkg_grab_M_and_do_something:n } { \peek_charcode:NTF C { \mypkg_grab_C_and_do_something:n } { \mypkg_something_else: } } Such code may be simplified (and sped up a bit) if we provided a \peek_case_charcode:NnTF function. Is there interest for such an additional function? Actually, looking at mhchem a bit more, it seems that there is probably room for simplification if we provided better tools for parsing. I'll think. Regards, Bruno