>> Another question I noticed is whether mappings should be made nestable >> or not. I _think_ that \seq_map_function:NN is nestable, and that >> \seq_map_inline:Nn and \seq_map_variable:NNn are not. All three can be >> made expandable, I believe. Should they? > > Indeed they should. > I ran into this problem just the other day and left a note to come back to > this issue :) I'll do that tomorrow (there is a typo above, I mean "All three can be made _nestable_"). > I've actually wondered if \seq_show:N is really needed at all, but we've > never come up with a good enough argument to drop it completely in favour of > \seq_display:N. > > I've updated a small handful of test cases to use \seq_display:N instead, > but there are many more examples that use \meaning (etc.) that probably need > adjusting. In fact, quite a few tests are \prop_display:N with a prop whose items are seq, so we can't use \seq_display:N for that. These will remain to be changed when/if we switch. > It's just a few in xor, right? I think, yes. > Looking in say \xor_save_area_info:n, I'm a bit confused by what it does: does the content of, e.g., \g_xor_area_DDD_float_seq have to be fully expanded? Otherwise \cs_set_nopar:Npx \@tempa { \exp_not:N \int_gset:cn {g_xor_area_ #1 _float_int} {\int_use:c {g_xor_area_ #1 _float_int} } \gdef \expandafter\noexpand \csname g_xor_area_#1_float_seq \endcsname {\csname g_xor_area_#1_float_seq\endcsname} } can be replaced by \cs_set_nopar:Npx \@tempa { \exp_not:N \int_gset:cn {g_xor_area_ #1 _float_int} {\int_use:c {g_xor_area_ #1 _float_int} } \gdef \exp_not:c {g_xor_area_#1_float_seq} { \exp_not:v {g_xor_area_#1_float_seq} } } which just unpacks \g_xor_area_#1_float_seq. That would be simpler. > perhaps all it needs is for \seq_elt:w > and \seq_elt_end: to be \protected, and then their reassignment to \relax > could be avoided. Haven't tried, though. Right. The default (i.e. the value when not inside a mapping) could be \cs_set_protected:Npn \seq_elt:w #1 \seq_elt_end: {\ERROR} \cs_set_eq:NN \seq_elt_end: \tex_relax:D and in the new scheme, \cs_set_protected:Npn \seq_elt:n #1 {\ERROR} But I don't like relying on a default value to be in effect for those \seq_elt... because there is too much risk that something goes wrong (e.g. the value is not restored after a mapping and you end up mapping instead of doing nothing). Also I would prefer the mapping to gobble its argument and raise an \ERROR, so that the error recovery is better: \cs_set:Npn \seq_elt:w #1 \seq_elt_end: {\ERROR} \cs_set:Npn \seq_elt:n #1 {\ERROR} Regards, -- Bruno