summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3seq.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3seq.sty37
1 files changed, 36 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty
index b80717c08ec..80ee168e421 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3seq.dtx 4434 2013-01-12 09:33:40Z bruno $
+\GetIdInfo$Id: l3seq.dtx 4500 2013-05-26 11:18:19Z bruno $
{L3 Sequences and stacks}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -391,6 +391,41 @@
}
\cs_new:Npn \__seq_count:n #1 { + \c_one }
\cs_generate_variant:Nn \seq_count:N { c }
+\cs_new:Npn \seq_use:Nnnn #1#2#3#4
+ {
+ \seq_if_exist:NTF #1
+ {
+ \int_case:nnn { \seq_count:N #1 }
+ {
+ { 0 } { }
+ { 1 } { \exp_after:wN \__seq_use:NnNnn #1 \__seq_item:n { } { } }
+ { 2 } { \exp_after:wN \__seq_use:NnNnn #1 {#2} }
+ }
+ {
+ \exp_after:wN \__seq_use:nwwwwnwn
+ \exp_after:wN { \exp_after:wN } #1 \__seq_item:n
+ \q_mark { \__seq_use:nwwwwnwn {#3} }
+ \q_mark { \__seq_use:nwwn {#4} }
+ \q_stop { }
+ }
+ }
+ { \__msg_kernel_expandable_error:nnn { kernel } { bad-variable } {#1} }
+ }
+\cs_generate_variant:Nn \seq_use:Nnnn { c }
+\cs_new:Npn \__seq_use:NnNnn \__seq_item:n #1 \__seq_item:n #2#3
+ { \exp_not:n { #1 #3 #2 } }
+\cs_new:Npn \__seq_use:nwwwwnwn
+ #1 \__seq_item:n #2 \__seq_item:n #3 \__seq_item:n #4#5
+ \q_mark #6#7 \q_stop #8
+ {
+ #6 \__seq_item:n {#3} \__seq_item:n {#4} #5
+ \q_mark {#6} #7 \q_stop { #8 #1 #2 }
+ }
+\cs_new:Npn \__seq_use:nwwn #1 \__seq_item:n #2 #3 \q_stop #4
+ { \exp_not:n { #4 #1 #2 } }
+\cs_new:Npn \seq_use:Nn #1#2
+ { \seq_use:Nnnn #1 {#2} {#2} {#2} }
+\cs_generate_variant:Nn \seq_use:Nn { c }
\cs_new_eq:NN \seq_push:Nn \seq_put_left:Nn
\cs_new_eq:NN \seq_push:NV \seq_put_left:NV
\cs_new_eq:NN \seq_push:Nv \seq_put_left:Nv