I am trying to create a nested sequence where each element is a sequence but for some reason it does not compile and exists with an emergency stop.
MWE:
\documentclass{article}
\usepackage{expl3}
\ExplSyntaxOn
\cs_generate_variant:Nn \seq_put_right:Nn {Ne}
\cs_generate_variant:Nn \seq_put_right:Nn {NV}
\seq_new:N \l__outer_seq
\seq_new:N \l__inner_seq
\NewDocumentCommand\add{m m m}
{
\seq_clear:N \l__inner_seq
\seq_put_right:Ne \l__inner_seq {##1}
\seq_put_right:Ne \l__inner_seq {##2}
\seq_put_right:Ne \l__inner_seq {##3}
\seq_put_right:NV \l__outer_seq \l__inner_seq
}
\ExplSyntaxOff
\begin{document}
\section{MWE}
\add{1}{2}{3}
\end{document}
After the call of add{1}{2}{3}
the outer sequence contains one element which is a (inner) sequence containing the element 1,2 and 3
Visual: [[1, 2, 3]] - the brackets represent a sequence
\l__inner_seq
the items in\l__outer_seq
? Please try and explain what\l__inner_seq
is expected to contain at the end of the process.:NV
means it takes two arguments so\seq_put_right:NV \l__outer_seq
is missing something.