summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/expl3/l3seq.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3seq.sty')
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3seq.sty19
1 files changed, 18 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3seq.sty b/Master/texmf-dist/tex/latex/expl3/l3seq.sty
index a28d9f64ad7..446e898e857 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3seq.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3seq.sty
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3seq.dtx 1362 2009-05-28 20:19:21Z joseph $
+\GetIdInfo$Id: l3seq.dtx 1415 2009-06-17 19:37:24Z will $
{L3 Experimental sequences and stacks}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -177,6 +177,23 @@
\cs_set_eq:NN \seq_elt:w \ERROR
}
\cs_generate_variant:Nn \seq_map_inline:Nn {c}
+\seq_new:N \l_seq_remove_seq
+\cs_new:Nn \seq_remove_duplicates_aux:NN {
+ \seq_clear:N \l_seq_remove_seq
+ \seq_map_function:NN #2 \seq_remove_duplicates_aux:n
+ #1 #2 \l_seq_remove_seq
+}
+\cs_new:Nn \seq_remove_duplicates_aux:n {
+ \seq_if_in:NnF \l_seq_remove_seq {#1} {
+ \seq_put_right:Nn \l_seq_remove_seq {#1}
+ }
+}
+\cs_new_nopar:Npn \seq_remove_duplicates:N {
+ \seq_remove_duplicates_aux:NN \seq_set_eq:NN
+}
+\cs_new_nopar:Npn \seq_gremove_duplicates:N {
+ \seq_remove_duplicates_aux:NN \seq_gset_eq:NN
+}
\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:No \seq_put_left:No