summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/erw-l3/1343c9c903.tex1
-rw-r--r--Master/texmf-dist/doc/latex/erw-l3/README.md10
-rw-r--r--Master/texmf-dist/doc/latex/erw-l3/README.txt7
-rw-r--r--Master/texmf-dist/doc/latex/erw-l3/erw-l3.pdfbin532611 -> 678206 bytes
-rw-r--r--Master/texmf-dist/source/latex/erw-l3/erw-l3.dtx2633
-rw-r--r--Master/texmf-dist/source/latex/erw-l3/erw-l3.ins68
-rw-r--r--Master/texmf-dist/tex/latex/erw-l3/erw-l3.sty642
7 files changed, 1985 insertions, 1376 deletions
diff --git a/Master/texmf-dist/doc/latex/erw-l3/1343c9c903.tex b/Master/texmf-dist/doc/latex/erw-l3/1343c9c903.tex
new file mode 100644
index 00000000000..2b16c526d77
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/erw-l3/1343c9c903.tex
@@ -0,0 +1 @@
+Hello,\ world!
diff --git a/Master/texmf-dist/doc/latex/erw-l3/README.md b/Master/texmf-dist/doc/latex/erw-l3/README.md
index a50f3691345..5facff0f19d 100644
--- a/Master/texmf-dist/doc/latex/erw-l3/README.md
+++ b/Master/texmf-dist/doc/latex/erw-l3/README.md
@@ -1,7 +1,7 @@
-----------------------------------------------------------------
-#### erw-l3 --- Utilities built around expl3
+-----------------------------------------------------------------
+##### erw-l3 --- Utilities for LaTeX3 programming
- Source repository: https://github.com/rogard/erw-l3
-- Released under the LaTeX Project Public License v1.3c or later; see http://www.latex-project.org/lppl.txt
-
-----------------------------------------------------------------
+- Released under the LaTeX Project Public License v1.3c or later
+- See http://www.latex-project.org/lppl.txt
+-----------------------------------------------------------------
diff --git a/Master/texmf-dist/doc/latex/erw-l3/README.txt b/Master/texmf-dist/doc/latex/erw-l3/README.txt
deleted file mode 100644
index 4010a82d977..00000000000
--- a/Master/texmf-dist/doc/latex/erw-l3/README.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-----------------------------------------------------------------
-erw-l3 --- Utilities built around expl3
-Source repository: https://github.com/rogard/erw-l3
-Released under the LaTeX Project Public License v1.3c or later
-See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
-
diff --git a/Master/texmf-dist/doc/latex/erw-l3/erw-l3.pdf b/Master/texmf-dist/doc/latex/erw-l3/erw-l3.pdf
index bbcff81588e..e8178b0dc40 100644
--- a/Master/texmf-dist/doc/latex/erw-l3/erw-l3.pdf
+++ b/Master/texmf-dist/doc/latex/erw-l3/erw-l3.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/erw-l3/erw-l3.dtx b/Master/texmf-dist/source/latex/erw-l3/erw-l3.dtx
index b538f3dd77d..eb504d5bbb6 100644
--- a/Master/texmf-dist/source/latex/erw-l3/erw-l3.dtx
+++ b/Master/texmf-dist/source/latex/erw-l3/erw-l3.dtx
@@ -1,39 +1,39 @@
% \iffalse meta-comment
% !TEX program = pdfLaTeX
-%<*internal>
+%<*internal>
\iffalse
-%</internal>
-%<*readme>
-----------------------------------------------------------------
-erw-l3 --- Utilities built around expl3
-Source repository: https://github.com/rogard/erw-l3
-Released under the LaTeX Project Public License v1.3c or later
-See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
+%</internal>
+%<*readme>
+-----------------------------------------------------------------
+##### erw-l3 --- Utilities for LaTeX3 programming
+- Source repository: https://github.com/rogard/erw-l3
+- Released under the LaTeX Project Public License v1.3c or later
+- See http://www.latex-project.org/lppl.txt
+-----------------------------------------------------------------
-%</readme>
-%<*internal>
+%</readme>
+%<*internal>
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
- \expandafter\begingroup
+\expandafter\begingroup
\fi
-%</internal>
-%<*install>
-\input docstrip.tex
+%</internal>
+%<*install>
+\input l3docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble
-----------------------------------------------------------------
-erw-l3 Utilities built around expl3
+----------------------------------------------------------------------------
+erw-l3 --- Utilities for LaTeX3 programming
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
+----------------------------------------------------------------------------
\endpreamble
\postamble
-Copyright (C) 2018 by Erwann Rogard
+Copyright (C) 2018-2020 by Erwann Rogard
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License (LPPL), either
@@ -45,1172 +45,1743 @@ http://www.latex-project.org/lppl.txt
This work is "maintained" (as per LPPL maintenance status) by
Erwann Rogard.
-This work consists of the file erw-l3.dtx
-and the derived files erw-l3.ins,
- erw-l3.pdf and
- erw-l3.sty.
+This work consists of the file erw-l3.dtx and the derived files:
+erw-l3.sty, and erw-l3.pdf.
\endpostamble
\generate{
\file{\jobname.sty}{\from{\jobname.dtx}{package}}
}
-%</install>
-%<install>\endbatchfile
-%<*internal>
+%</install>
+%<install> \endbatchfile
+%<*internal>
\generate{
\file{\jobname.ins}{\from{\jobname.dtx}{install}}
}
\nopreamble\nopostamble
\generate{
- \file{README.txt}{\from{\jobname.dtx}{readme}}
+ \file{README.md}{\from{\jobname.dtx}{readme}}
}
\ifx\fmtname\nameofplainTeX
- \expandafter\endbatchfile
+\expandafter\endbatchfile
\else
- \expandafter\endgroup
+\expandafter\endgroup
\fi
-%</internal>
-%<package>\RequirePackage{expl3}[2018/06/01]
-%<package>\RequirePackage{xparse}[2018/02/01]
-%<package>\RequirePackage{l3keys2e}
-%<package>\ProvidesExplPackage
-%<package> {erw-l3} % Package name
-%<package> {2020/02/05} % Release date
-%<package> {0.1.6} % Release version
-%<package> {Utilities built around expl3} % Description
-%
-%<*driver>
+%</internal>
+%<package> \NeedsTeXFormat{LaTeX2e}[2020/02/02]
+%<package> \RequirePackage{etoolbox}[2019/09/21]
+%<package> \RequirePackage{l3keys2e}[2020/03/06]
+%<package> \RequirePackage{xparse}[2020/03/06]
+%<package> \ProvidesExplPackage
+%<package> {erw-l3} % Package name
+%<package> {2020/06/04} % Release date
+%<package> {3.1} % Release version
+%<package> {erw-l3 --- Utilities for LaTeX3 programming } % Description
+%
+%<*driver>
+\RequirePackage{fvextra}%^^A\NB{done}{Warning:csquotes should be loaded after fvextra->nope}
\documentclass[full]{l3doc}
+\listfiles
+\usepackage[english]{babel}
+\AtBeginDocument{\selectlanguage{english}}
+\usepackage{bookmark}
+\usepackage[T1]{fontenc}
\usepackage{erw-l3}
-\usepackage{float}
+\usepackage{microtype}
+\usepackage{nolbreaks}
\usepackage{tabto}
-\usepackage{cleveref}
-\ExplSyntaxOn
-\tl_gset:Nn \partname {Part}
-\ExplSyntaxOff
+\usepackage{tcolorbox}
+\tcbuselibrary{listings, breakable}
+\usepackage{xparse}
+\usepackage{hyperref}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
-% \AtEndDocument { \PrintChanges \PrintIndex } % TODO
+% ^^A\AtEndDocument { \PrintChanges \PrintIndex }
+\makeatletter
+\newcommand*{\docsetnameref}{\def\@currentlabelname}%https://tex.stackexchange.com/questions/537751
+\makeatother
+\ExplSyntaxOn
+\tl_gset:Nn \partname {Part}
+\newenvironment{docabstract}[1]%https://latex.org/forum/viewtopic.php?t=12156
+{\renewcommand{\abstractname}{#1}\begin{abstract}}
+ {\end{abstract}}
+\cs_new:Nn \__erw_docu:n{\MakeUppercase #1}
+\ProvideDocumentCommand\DocPhantomSection{smmm}
+{
+ \leavevmode
+ \refstepcounter{#2}
+ \IfBooleanT{#1}
+ {
+ \addcontentsline{toc}{#2}{\protect\numberline{\use:c{the#2}}#3}
+ }
+ \docsetnameref{#3}
+ \label{#4}
+}
+\providecommand\docU[1]{\exp_args:Nx \__erw_docu:n{#1}}
+\ExplSyntaxOff
+% ^^A Sort--->
+\providecommand\docarg[1]{\texttt{#1}} % fun[param] (macro) vs fun[arg] (eval)
+\providecommand\docargnoval{\c_novalue_tl}
+\providecommand\docassign[2]{#1~$\leftarrow$~#2}
+\providecommand\docccept[1]{\textit{#1}}
+\providecommand\doccceptargspec{arg~spec}
+\providecommand\doccceptbool{boolean}
+\providecommand\doccceptcont{container}
+\providecommand\doccceptclist{clist}
+\providecommand\doccceptcode{code}
+\providecommand\doccceptcsname{cs name}
+\providecommand\doccceptcsorcode{cs~or~code}
+\providecommand\doccceptcs{cs}
+\providecommand\doccceptempty{empty}
+\providecommand\doccceptgroup{local~group}
+\providecommand\doccceptint{integer}
+\providecommand\doccceptitems{items}
+\providecommand\doccceptkey{key}
+\providecommand\doccceptkvl{keyval~list}
+\providecommand\doccceptopt{option}
+\providecommand\doccceptpath{path}
+\providecommand\doccceptplaceh{placeholder}
+\providecommand\doccceptpre{preamble}
+\providecommand\doccceptprop{prop}
+\providecommand\doccceptsep{separators}
+\providecommand\doccceptseq{seq}
+\providecommand\docccepttlvar{tl~var}
+\providecommand\docccepttl{token~list}
+\providecommand\docccepttok{token}
+\providecommand\doccceptval{val}
+\providecommand\docconv[1]{convention~\autoref{conv:#1}}
+\providecommand\docdefaultfor{default~for~}
+\providecommand\docenvdoc{\env{document}}
+\providecommand\doceval[1]{\texttt{\char`\{}#1\texttt{\char`\}}}
+\providecommand\docexpand[2]{#1~$\rightarrow$~#2}
+\providecommand\docfillblank{\begin{minipage}[t]{\linewidth}\end{minipage}}
+\providecommand\docissuedont{Don't: }
+\providecommand\docissuedo{Do: }
+\providecommand\docissuesymp{Symptom: }
+\providecommand\doclist[1]{Listing~\ref{listing:#1}}
+\providecommand\docnb{\noindent\textbf{NB}:~}
+\providecommand\docoptd[1]{\texttt{\textless}#1\texttt{\textgreater}}
+\providecommand\docopte[2]{\texttt{#1}\doceval{#2}}
+\providecommand\docopto[1]{\texttt{[}#1\texttt{]}}
+\providecommand\docpipe{\textbar}
+\providecommand\doccs[1]{\texttt{\textbackslash{}#1}}
+\providecommand\docreflist[1]{Listing~\ref{listing:#1}}
+\providecommand\docsee{See:~}
+\providecommand\docstep[1]{step~\ref{step:#1}}
+\providecommand\doctip{\noindent\textbf{Tip}:~}
+\providecommand\docvers[2]{v#1.#2}
+\providecommand\docwarn{\noindent\textbf{Warning}:~}
+\providecommand\docxparsed[1][~argument]{`d'-type~#1}
+\providecommand\docxparsee[1][~argument]{`e'-type~#1}
+\providecommand\docxparsem[1][~argument]{`m'-type~#1}
+\providecommand\docxparseo[1][~argument]{`o'-type~#1}
+\providecommand\pkgkey{key$_{i}$}
+\providecommand\pkgobj[1]{object identified by #1}
+\providecommand\pkgoptex{\docarg{Expans}}
+\providecommand\pkgoptfi{\docarg{File}}
+\providecommand\pkgoptin{\docarg{Inner}}
+\providecommand\pkgoptions{kvl0}
+\providecommand\pkgoptou{\docarg{Outer}}
+\providecommand\pkgoptpad{\docarg{Default}}%default
+\providecommand\pkgoptpa{\docarg{Param}}
+\providecommand\pkgoptse{\docarg{Separ}}
+\providecommand\pkgoptwr{\docarg{Write}}
+\providecommand\pkgparap{\texttt{+}}%append
+\providecommand\pkgparex{\texttt{*}}%expand
+\providecommand\pkgparhe{tl$_{1}$}%head
+\providecommand\pkgparin{code$_{1}$}%inner
+\providecommand\pkgparkvlnxt{kvl$_{2}$}
+\providecommand\pkgparkvl{kvl$_{1}$}
+\providecommand\pkgparou{code$_{2}$}%outer
+\providecommand\pkgparpa{tl$_{2}$}%param
+\providecommand\pkgparsiii{tl$_{5}$}
+\providecommand\pkgparsii{tl$_{4}$}
+\providecommand\pkgparsi{tl$_{3}$}
+\providecommand\pkgpars{\Arg{\pkgparsi}\docpipe\Arg{\pkgparsi}\Arg{\pkgparsii}\docpipe\Arg{\pkgparsi}\Arg{\pkgparsii}\Arg{\pkgparsiii}}%separ
+\providecommand\pkgparta{tl$_{6}$}%tail
+\providecommand\pkgsep[1]{\Arg{#1}}
+\providecommand\pkgval{val$_{i}$}
+% ^^A Sort<---
\begin{document}
- \DocInput{\jobname.dtx}
+\DocInput{\jobname.dtx}
\end{document}
-%</driver>
+%</driver>
% \fi
-%
+%
% \GetFileInfo{\jobname.sty}
-%
-%
-%\title{^^A
-% \textsf{erw-l3}\thanks{^^A
-% This file describes version \fileversion, last revised \filedate.^^A
-% }^^A
-%}
-%\author{Erwann Rogard\thanks{firstname dot lastname AusTria gmail dot com}}
-%
-%
-%\date{Released \filedate}
-%
-%\maketitle
-%
-%\begin{abstract}\LaTeX3 package defining commands built around \pkg{expl3}\cite{interface3}.
-% For example, \cs{erw_compose} implements the mathematical concept $f_1 \circ f_2 \dots \circ f_n$.
-%\end{abstract}
-%
-% \tableofcontents
-%
-% \section*{Conventions}
-%
-% The naming conventions are (loosely) those of \LaTeX3.
-% For example, \meta{cs} stands for \emph{control sequence}, which is described in \cite[Part~\pkg{l3basics}]{interface3}.
-%
-% \section*{Requirement}
-%
-% Have \file{erw-l3.sty} is in the path of the \LaTeX~engine.
-%
-% \part{Usage}\label{part:usage}
-%
-% In the preamble of \cs{documentclass}, put:
-% \begin{center}
-% \cs{usepackage}\oarg{options}|{|\pkg{erw-l3}|}|\linebreak
-% \end{center}
-%
-% \section{\textsf{compose}}
-%
-% \subsection{\textsf{backend}}
-%
-% \begin{function}{\erw_compose:nV,\erw_compose:nn}
-% \begin{syntax}
-% \cs{erw_compose:nV}\marg{cs list}\meta{var}
-% \end{syntax} Implements the mathematical concept $f_1 \circ f_2 \dots \circ f_n$.
-% See Listing~\autoref{listng:compose}
-% \end{function}
-%
-% \begin{function}{\erw_compose_c:nV,\erw_compose_c:nn}
-% \begin{syntax}
-% \cs{erw_compose_c:nV}\marg{cs names}\meta{var}
-% \end{syntax}
-% See Listing~\autoref{listng:compose:c}
-% \end{function}
-%
-% \begin{function}{\erw_compose_seq:nV}
-% \begin{syntax}
-% \cs{erw_compose_seq:nV}\marg{cs list}\meta{seq}
-% \end{syntax} Same as \cs{erw_compose:nV}, but saves each intermediary step
-% See Listing~\autoref{listng:compose:seq}
-% \end{function}
-%
-% \begin{function}{\erw_compose_seq_c:nV}
-% \begin{syntax}
-% \cs{erw_compose_seq_c:nV}\marg{cs names}\meta{seq}
-% \end{syntax}
-% See Listing~\autoref{listng:compose:seq:c}
-% \end{function}
-%
-% \begin{function}{\erw_compose_vers:nV,\erw_compose_vers:nn}
-% \begin{syntax}
-% \cs{erw_compose_vers:nV}\marg{list of cs or code}\meta{var}
-% \end{syntax}
-% See Listing~\autoref{listng:compose:vers}.
-% Only the |nn| version is implemented
-% \end{function}
-%
-% \begin{function}{\erw_compose_seq_vers:nV,\erw_compose_seq_vers:nn}
-% \begin{syntax}
-% \cs{erw_compose_seq_vers:nV}\marg{list of cs or code}\meta{seq}
-% \end{syntax}
-% {\color{red}Not implemented}
-% \end{function}
-%
-% \section{\textsf{csutil}}
-%
-% \subsection{\textsf{backend}}
-%
-% \begin{function}{\erw_accum:nn}
-% \begin{syntax}{\cs{erw_accum:nn}}\marg{token list}\marg{item}
-% \end{syntax}Expands to a token list comprising the items of \meta{token list} and \meta{item}
-% \end{function}
-%
-% \begin{function}{\erw_apply:Nn, \erw_apply:cn, \erw_apply:Nnn, \erw_apply:Nnnn, \erw_apply:Nnnnn}
-% \begin{syntax}{\cs{erw_apply:Nn}}\meta{cs}\marg{arg}
-% \end{syntax}Expands to \meta{cs}\marg{arg}
-% \end{function}
-%
-% \begin{function}{\erw_cs_set_eq:NN, \erw_cs_set_eq:cN,\erw_cs_gset_eq:NN, \erw_cs_gset_eq:cN}
-% \begin{syntax}{\cs{erw_cs_set_eq:NN}}\meta{cs1}\meta{cs2}
-% \end{syntax}\meta{cs1}\textleftarrow\meta{cs2}
-% \end{function}
-%
-% \begin{function}{\erw_cs_set_inline:Nn, \erw_cs_set_inline:cn,\erw_cs_gset_inline:Nn, \erw_cs_gset_inline:cn}
-% \begin{syntax}{\cs{erw_cs_set_inline:Nn}}\meta{cs}\marg{code}
+% \begin{documentation}
+% \title{The \pkg{erw-l3} package \thanks{^^A
+% This file describes version \fileversion, last revised \filedate.^^A
+% }^^A
+% }
+% \author{Erwann Rogard\thanks{firstname dot lastname AusTria gmail dot com}}
+%
+% \date{Released \filedate}
+%
+% \maketitle
+% \begingroup
+% \selectlanguage{english}
+% \begin{docabstract}{Abstract}
+% Utilities for \LaTeX3 programming\cite{interface3}.
+% \end{docabstract}
+% \endgroup
+%
+% \tableofcontents
+%
+% \part{Usage}\label{part:usage}
+% ^^A \VerbatimFootnotes
+%
+% \DocPhantomSection*{section}{Loading the package}{usage:load}
+% \begin{function}{\usepackage}
+% \begin{syntax}
+% \cs{usepackage}\doceval{\pkg{\jobname}}
% \end{syntax}
-% \end{function}
-%
-% \begin{function}{\erw_identity:n}
-% \begin{syntax}{\cs{erw_identity:n}}\marg{arg}
-% \end{syntax} Expands to \meta{arg}
-% \end{function}
-%
-% \begin{function}{\erw_is_matrix_p:n,\erw_is_matrix:nTF}
-% \begin{syntax}{\cs{erw_is_matrix_p:n}}\marg{token list}
-% \end{syntax} Checks if \meta{token list} is a (square) matrix.
-% \end{function}
-%
-% \begin{function}{\erw_fold:NV, \erw_fold:cV}
-% \begin{syntax}{\cs{erw_fold:NV}}\meta{cs}\meta{var}
-% \end{syntax}\meta{var}\textleftarrow \cs{erw_apply:NV}\meta{cs}\meta{var}.
-% See Listing~\autoref{listng:fold}.
-% \end{function}
-%
-% \begin{function}{\erw_last_item:nn}
-% \begin{syntax}{\cs{erw_last_item:nn}}\marg{int}\marg{token list}
-% \end{syntax} ^^ASee Listing~\autoref{listng:items}
-% \end{function}
-%
-% \begin{function}{\erw_merge:nn}
-% \begin{syntax}{\cs{erw_merge:nn}}\marg{tl 1}\marg{tl 2}
-% \end{syntax}Merges \meta{tl 1}\meta{tl 2}
-% \end{function}
-%
-% \begin{function}{\erw_repeat:nn}
-% \begin{syntax}{\cs{erw_repeat:nn}}\marg{int}\marg{value}
-% \end{syntax}
-% See Listing~\autoref{listng:repeat}
-% \end{function}
-%
-% \begin{function}{\erw_split:nn}
-% \begin{syntax}{\cs{erw_split:nn}}\marg{token list}\marg{delimiter}
-% \end{syntax} See Listing~\autoref{listng:split}
-% \end{function}
-%
-% \section{\textsf{int}}
-%
-% \subsection{\textsf{backend}}
-%
-% \begin{function}{\erw_int_range:nn}
-% \begin{syntax}{\cs{erw_int_range:nn}}\marg{first}{last}
-% \end{syntax} Returns a range of integers. Implementation different than \cs{int_step_inline}
-% \end{function}
-%
-% \begin{function}{\erw_int_range:n}
-% \begin{syntax}{\cs{erw_int_range:n}}\marg{count}
-% \end{syntax} Returns a range of integers. Implementation different than \cs{int_step_inline}. See Listing~\autoref{listng:int:range}
-% \end{function}
-%
-% \section{\textsf{map}}
-%
-% \subsection{\textsf{backend}}
-%
-% \begin{function}{\erw_set_map:N,\erw_gset_map:N}
-% \begin{syntax}{\cs{erw_set_map:N}}\meta{cs}
-% \end{syntax} Sets the function used by \cs{erw_map:n}.
-% \end{function}
-%
-% \begin{function}{\erw_set_map_inline:n,\erw_gset_map_inline:n}
-% \begin{syntax}{\cs{erw_set_map_inline:n}}\marg{code}
-% \end{syntax} Sets the function used by \cs{erw_map:n}.
-% \end{function}
-%
-% \begin{function}{\erw_map:n}
-% \begin{syntax}{\cs{erw_map:n}}\marg{token list}
-% \end{syntax} Applies the stored \meta{cs} to each item in \meta{token list}. An application is \cs{erw_is_matrix}
-% \end{function}
-%
-% \begin{function}{\erw_map:Nn}
-% \begin{syntax}{\cs{erw_map:Nn}}\meta{cs}\marg{token list}
+% \begin{description}
+% \item[Requirement]\docfillblank
+% \begin{enumerate}
+% \item \file{\jobname.sty} and its dependencies are in the path of the \LaTeX~engine. See \autoref{part:other}, \autoref{other:support}.
+% \item Goes in the~\docccept{\doccceptpre}
+% \end{enumerate}
+% \end{description}
+% \end{function}
+%
+% \section{\textsf{cs}}\label{usage:cs}
+% \begin{function}{\erw_cs_compose:NnN}
+% \begin{syntax}
+% \cs{erw_cs_compose:NnN}\meta{\doccceptcs}\Arg{\doccceptitems}\meta{\docccepttlvar}
% \end{syntax}
-% See Listing~\autoref{listng:map}.
-% Redundant with \cs{tl_map_function:nN}
-% \end{function}
-%
-% \begin{function}{\erw_map_inline:nn}
-% \begin{syntax}{\cs{erw_map_inline:nn}}\marg{code}\marg{args}
+% \end{function}
+% \begin{function}{\erw_cs_identity:n}
+% \begin{syntax}
+% \cs{erw_cs_identity:n}\Arg{arg}
% \end{syntax}
-% See Listing~\autoref{listng:mapinl}
-% \end{function}
-%
-% \begin{function}{\erw_map_indexed:Nnn}
-% \begin{syntax}{\cs{erw_map_indexed:Nnn}}\meta{cs}\marg{int}\marg{matrix of tokens}
-% \end{syntax} {\color{red} Not implemented}. See Listing~\autoref{listng:mapindexed}.
-% \end{function}
-%
-% \begin{function}{\erw_map_thread:Nn}
-% \begin{syntax}{\cs{erw_map_thread:Nn}}\meta{cs}\marg{matrix of tokens}
-% \end{syntax} Threads \meta{cs} over the columns, where the arity of \meta{cs} must be equal to the number of rows.
-% See Listing~\autoref{listng:thread}
-% \end{function}
-%
-% \begin{function}{\erw_map_thread_at:Nnn}
-% \begin{syntax}{\cs{erw_map_thread_at:Nnn}}\meta{cs}\marg{matrix of tokens}
-% \end{syntax}
-% \end{function}
-%
-% \section{\textsf{numbrdcs}}
-%
-% \subsection{backend}
-%
-% \begin{function}{\erw_numbrd_cs_reset:}
-% \begin{syntax}\cs{erw_numbrd_cs_reset:}|{}|
-% \end{syntax} See Listing~\ref{listng:numbrdcs:names}
-% \end{function}
-%
-% \begin{function}{ \erw_numbrd_cs_new:n}
-% \begin{syntax}\cs{erw_numbrd_cs_new:n} \marg{cs or code}
-% \end{syntax} Use it as the first arg to \cs{tl_function_map:Nn}
-% \end{function}
-%
-% \begin{function}{ \erw_numbrd_cs:nn}
-% \begin{syntax}\cs{erw_numbrd_cs:nn} \marg{cs or code}
-% \end{syntax}
-% \end{function}
-%
-% \begin{function}{\erw_numbrd_cs_names_braced:nnn}
-% \begin{syntax}\cs{erw_numbrd_cs_names_braced:nnn}\marg{first}\marg{step}\marg{last}
-% \end{syntax}See Listing~\ref{listng:numbrdcs:names}
-% \end{function}
-%
-% \subsection{frontend}
-%
-% \begin{function}{\numbrdcsnew,\numbrdcsnew*}
-% \begin{syntax}\cs{numbrdcsnew}\marg{list of cs or code}
-% \end{syntax} Creates numbered control sequences. The starred version does not reset. See Listing~\ref{listng:numbrdcs}
-% \end{function}
-%
-% \begin{function}{\numbrdcs}
-% \begin{syntax}\cs{numbrdcs}\marg{int}\marg{arg}
-% \end{syntax} Evaluates control sequence numbered \meta{int} with argument \meta{arg}. See Listing~\ref{listng:numbrdcs}
-% \end{function}
-%
-% \clearpage
-%
-% \part{Listings}\label{part:listng}
-%
-% \floatstyle{ruled}
-% \newfloat{Listing}{H}{lop}
-% \NewDocumentCommand{\erwtab}{O{0.5}}{\tabto{#1\linewidth}}
-%
-% \section{compose}
-%
-% \subsection{\textsf{backend}}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn|\ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo #1 {f(#1)}|\erwtab\cs_set:Npn \__foo #1 {f(#1)}
-% \\\verb|\cs_set:Npn \__bar #1 {g[#1]}|\erwtab\cs_set:Npn \__bar #1 {g[#1]}
-% \\\verb|\cs_set:Npn \__baz #1 {h\{#1\}}|\erwtab\cs_set:Npn \__baz #1 {h\{#1\}}
-% \\\verb|\tl_set:Nn \l_tmpa_tl{X}|\erwtab\tl_set:Nn \l_tmpa_tl{X}
-% \\\verb|\erw_compose:nV{|
-% \\\verb| {\__baz}{\__bar}{\__foo}}|
-% \\\verb| \l_tmpa_tl|\erwtab\erw_compose:nV{{\__baz}{\__bar}{\__foo}}\l_tmpa_tl
-% \\\verb|\l_tmpa_tl|\erwtab\l_tmpa_tl
-% \\\verb|\tl_set:Nn \l_tmpa_tl{X}|\tl_set:Nn \l_tmpa_tl{X}
-% \\\verb|\erw_compose:nn{|
-% \\\verb| {\__baz}{\__bar}{\__foo}}|
-% \\\verb| {X}|\erwtab\erw_compose:nn{{\__baz}{\__bar}{\__foo}}{X}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:compose}
-% \end{Listing}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn|\ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo #1 {f(#1)}|\cs_set:Npn \__foo #1 {f(#1)}
-% \\\verb|\cs_set:Npn \__bar #1 {g[#1]}|\cs_set:Npn \__bar #1 {g[#1]}
-% \\\verb|\cs_set:Npn \__baz #1 {h\{#1\}}|\cs_set:Npn \__baz #1 {h\{#1\}}
-% \\\verb|\tl_set:Nn \l_tmpa_tl{X}|\tl_set:Nn \l_tmpa_tl{X}
-% \\\verb|\erw_compose_c:nV{|
-% \\\verb| {__baz}{__bar}{__foo}}|
-% \\\verb| \l_tmpa_tl|\erwtab\erw_compose_c:nV{{__baz}{__bar}{__foo}}\l_tmpa_tl
-% \\\verb|\l_tmpa_tl|\erwtab\l_tmpa_tl
-% \\\verb|\erw_compose_c:nn{|
-% \\\verb| {__baz}{__bar}{__foo}}|
-% \\\verb| {X}|\erwtab\erw_compose_c:nn{{__baz}{__bar}{__foo}}{X}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:compose:c}
-% \end{Listing}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn|\ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo #1 {f(#1)}|\cs_set:Npn \__foo #1 {f(#1)}
-% \\\verb|\cs_set:Npn \__bar #1 {g[#1]}|\cs_set:Npn \__bar #1 {g[#1]}
-% \\\verb|\cs_set:Npn \__baz #1 {h\{#1\}}|\cs_set:Npn \__baz #1 {h\{#1\}}
-% \\\verb|\seq_new:N\l_tmp_seq|\erwtab\seq_new:N \l_tmp_seq
-% \\\verb|\seq_put_right:Nn\l_tmp_seq{X}|\erwtab\seq_put_right:Nn \l_tmp_seq{X}
-% \\\verb| \erw_compose_seq:nV{|
-% \\\verb| {\__baz}{\__bar}{\__foo}}|
-% \\\verb| \l_tmp_seq|\erwtab \erw_compose_seq:nV{{\__baz}{\__bar}{\__foo}}\l_tmp_seq
-% \\\verb|\seq_item:Nn\l_tmp_seq{1}|\erwtab \seq_item:Nn \l_tmp_seq{1}
-% \\\verb|\seq_item:Nn\l_tmp_seq{2}|\erwtab \seq_item:Nn \l_tmp_seq{2}
-% \\\verb|\seq_item:Nn\l_tmp_seq{3}|\erwtab \seq_item:Nn \l_tmp_seq{3}
-% \\\verb|\seq_item:Nn\l_tmp_seq{4}|\erwtab \seq_item:Nn \l_tmp_seq{4}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{}\label{listng:compose:seq}
-% \end{Listing}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn|\ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo #1 {f(#1)}|\cs_set:Npn \__foo #1 {f(#1)}
-% \\\verb|\cs_set:Npn \__bar #1 {g[#1]}|\cs_set:Npn \__bar #1 {g[#1]}
-% \\\verb|\cs_set:Npn \__baz #1 {h\{#1\}}|\cs_set:Npn \__baz #1 {h\{#1\}}
-% \\\verb|\seq_new:N\l_tmp_seq|
-% \\\verb|\seq_put_right:Nn\l_tmp_seq{X}|\erwtab\seq_put_right:Nn \l_tmp_seq{X}
-% \\\verb|\erw_compose_seq_c:nV{|
-% \\\verb| {__baz}{__bar}{__foo}}|
-% \\\verb| \l_tmp_seq|\erwtab \erw_compose_seq_c:nV{{__baz}{__bar}{__foo}}\l_tmp_seq
-% \\\verb|\seq_item:Nn\l_tmp_seq{1}|\erwtab \seq_item:Nn \l_tmp_seq{1}
-% \\\verb|\seq_item:Nn\l_tmp_seq{2}|\erwtab \seq_item:Nn \l_tmp_seq{2}
-% \\\verb|\seq_item:Nn\l_tmp_seq{3}|\erwtab \seq_item:Nn \l_tmp_seq{3}
-% \\\verb|\seq_item:Nn\l_tmp_seq{4}|\erwtab \seq_item:Nn \l_tmp_seq{4}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{}\label{listng:compose:seq:c}
-% \end{Listing}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn|\ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo #1 {f(#1)}|\cs_set:Npn \__foo #1 {f(#1)}
-% \\\verb|\cs_set:Npn \__bar #1 {g[#1]}|\cs_set:Npn \__bar #1 {g[#1]}
-% \\\verb|\cs_set:Npn \__baz #1 {h\{#1\}}|\cs_set:Npn \__baz #1 {h\{#1\}}
-% \\\verb|\erw_compose_vers:nn{|
-% \\\verb| {\__baz}{g[#1]}{\__foo}}|
-% \\\verb| {X}|\erwtab\erw_compose_vers:nn{{\__baz}{g[#1]}{\__foo}}{X}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{}\label{listng:compose:vers}
-% \end{Listing}
-%
-% \section{csutil}
-%
-% \subsection{\textsf{backend}}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn| \ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo #1 {f(#1)}|\erwtab\cs_set:Npn \__foo #1 {f(#1)}
-% \\\verb|\erw_apply:Nn\__foo{X}|\erwtab\erw_apply:Nn\__foo{X}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:apply}
-% \end{Listing}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn| \ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo #1 {f(#1)}|\cs_set:Npn \__foo #1 {f(#1)}
-% \\\verb|\tl_set:Nn \l_tmpa_tl{X}|\erwtab\tl_set:Nn \l_tmpa_tl{X}
-% \\\verb|\erw_fold_set_par:n{Nf}|\erw_fold_set_par:n{Nf}
-% \\\verb|\erw_fold_apply_par:n{Nf}|\erw_fold_apply_par:n{Nf}
-% \\\verb|\erw_fold:NV\__foo\l_tmpa_tl|\erwtab\erw_fold:NV\__foo\l_tmpa_tl
-% \\\verb|\l_tmpa_tl|\erwtab\l_tmpa_tl
-% \\\verb|\cs_set:Npn\__bar #1 {g[#1]}|\erwtab\cs_set:Npn \__bar #1 {g[#1]}
-% \\\verb|\erw_fold:cV{__bar}\l_tmpa_tl|\erwtab\erw_fold:cV {__bar}\l_tmpa_tl
-% \\\verb|\l_tmpa_tl|\erwtab\l_tmpa_tl
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:fold}
-% \end{Listing}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn| \ExplSyntaxOn
-% \\\verb|\erw_is_matrix:nTF|
-% \\\verb|{|
-% \\\verb| { {a}{b}{c} }|
-% \\\verb| { {k}{l}{m} }|
-% \\\verb| { {x}{y}{z} }|
-% \\\verb|}{T}{F}|\erwtab\erw_is_matrix:nTF
-% {
-% { {a}{b}{c} }
-% { {k}{l}{m} }
-% { {x}{y}{z} }
-% }{T}{F}
-% \\\verb|\erw_is_matrix:nTF|
-% \\\verb|{|
-% \\\verb| { {a}{c} }|
-% \\\verb| { {k} }|
-% \\\verb| { {x}{y}{z} }|
-% \\\verb|}{T}{F}|\erwtab
-% \erw_is_matrix:nTF
-% {
-% { {a}{c} }
-% { {k} }
-% { {x}{y}{z} }
-% }{T}{F}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:ismatrix}
-% \end{Listing}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn| \ExplSyntaxOn
-% \\\verb|\erw_repeat:nn|
-% \\\verb| {3}{abracad}abra| \erwtab \erw_repeat:nn{3}{abracad}abra
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:repeat}
-% \end{Listing}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn| \ExplSyntaxOn
-% \\\verb|\erw_split:nn|
-% \\\verb| {{a}{b}{c}}{==}| \erwtab \erw_split:nn{{a}{b}{c}}{==}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:split}
-% \end{Listing}
-%
+% \end{function}
+% \begin{function}{\erw_cs_set_inline:Nn, \erw_cs_set_inline:cn, \erw_cs_gset_inline:Nn, \erw_cs_set_inline:cn}
+% \begin{syntax}
+% \cs{erw_cs_set_inline:Nn}\meta{\doccceptcs}\Arg{\doccceptcode}
+% \end{syntax}
+% \end{function}
+%
+% \section{\textsf{csint}}
+% \begin{function}{\erw_csint:nn}
+% \begin{syntax}
+% \cs{erw_csint:nn}\Arg{\doccceptint}\Arg{arg}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_csint_name:n}
+% \begin{syntax}
+% \cs{erw_csint_name:n}\Arg{\doccceptint}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_csint_names_braced:, \erw_csint_names_braced:n, \erw_csint_names_braced:nnn}
+% \end{function}
+% \begin{function}{\erw_csint_new:n}
+% \begin{syntax}
+% \cs{erw_csint_new:n}\Arg{\doccceptint}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_csint_reset:}
+% \begin{syntax}
+% \cs{erw_csint_reset:}
+% \end{syntax}
+% \end{function}
+%
+% \section{\textsf{int}} \label{usage:int}
+% \begin{function}{\erw_int_range:n, \erw_int_range:nn}
+% \begin{syntax}
+% \cs{erw_int_range:n}\Arg{\doccceptint}
+% \end{syntax}
+% \end{function}
+%
+% \section{\textsf{keys}} \label{usage:keys}
+% \begin{function}{\erw_keyval_parse:NNNn}
+% \begin{syntax}
+% \cs{erw_keyval_parse:NNNn} \meta{\doccceptcont}\meta{\doccceptcs_1}\meta{\doccceptcs_2}\doceval{\doceval{\meta\docccepttl_1}\dots}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_keyval_error:Nn, \erw_keyval_error:Nnn}
+% \begin{syntax}
+% \cs{erw_keyval_error:Nn}\meta{\docccepttok}\Arg{\doccceptkvl}\\
+% \cs{erw_keyval_error:Nnn}\meta{\docccepttok}\Arg{\doccceptclist}
+% \end{syntax}
+% \end{function}
+%
+% \section{\textsf{lambda}} \label{usage:lambda}
+% \begin{function}{\erw_lambda:nnn}
+% \begin{syntax}
+% \cs{erw_lambda:nnn}\meta{\docccepttok}\Arg{\doccceptargspec}\Arg{\doccceptcode}
+% \end{syntax}
+% \end{function}
+%
+% \section{\textsf{option}}\label{usage:option}
+% \begin{function}{\erw_option:n}
+% \begin{syntax}
+% \cs{erw_option:n}\Arg{\doccceptkvl}
+% \end{syntax}
+% \end{function}
+%
+% \DescribeOption{tl / fold_set_par}
+% \DescribeOption{tl / fold_apply_par}
+% \DescribeOption{sys / timestamp_delim}
+%
+% \section{\textsf{prop}}\label{usage:prop}
+% All functions that modify a \meta{\doccceptprop} first create it if not exist.
+%
+% \begin{function}{\erw_prop_keyval_parse:NNNn}
+% \begin{syntax}
+% \cs{erw_prop_keyval_parse:NNNn}\meta{\doccceptprop}\meta{\doccceptcs_1}\meta{\doccceptcs_2}\Arg{\doccceptkvl}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_prop_map_item:NNN}
+% \begin{syntax}
+% \cs{erw_prop_map_item:NNN}\meta{\doccceptcs}\meta{\doccceptprop_1}\meta{\doccceptprop_2}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_prop_to_clist:Nn}
+% \begin{syntax}
+% \cs{erw_prop_to_clist:Nn}\meta{\doccceptprop}\doceval{\meta{\doccceptkey_1},\dots}
+% \end{syntax}
+% \end{function}
+%
+%
+% \section{\textsf{seq}}\label{usage:seq}
+% All functions that modify a \meta{\doccceptseq} first create it if not exists.
+% \begin{function}{\erw_seq_fold:NN,\erw_seq_fold:cN}
+% \begin{syntax}
+% \cs{erw_seq_fold:NN}\Arg{\Arg{\doccceptcs_1}\dots}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_seq_put_right_clist:Nn, \erw_seq_put_right_clist:cn}
+% \begin{syntax}
+% \cs{erw_seq_put_right_clist:Nn}\meta{\doccceptseq}\Arg{\doccceptclist}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_seq_put_right_prop:NNn}
+% \begin{syntax}
+% \cs{erw_seq_put_right_prop:NNn}\meta{\doccceptseq}\meta{\doccceptprop}\Arg{\doccceptclist}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_seq_use:Nn}
+% \begin{syntax}
+% \cs{erw_seq_use:Nn}\meta{\doccceptseq}\Arg{\doccceptitems}
+% \end{syntax}
+% \begin{description}
+% \item[Also see] \cite[Section 8 of \pkg{l3seq}]{interface3}
+% \item[Semantics] \cs{seq_use:Nnnn}\meta{\doccceptseq}\nameref{usage:tl:sep}\Arg{\doccceptitems}
+% \end{description}
+% \end{function}
+%
+% \section{\textsf{sys}}\label{usage:sys}
+% \begin{function}{\erw_sys_jobnametimestamp:nn,\erw_sys_jobnametimestamp:}
+% \begin{syntax}
+% \cs{erw_sys_jobnametimestamp:nn}\doceval{date\docpipe{}time\docpipe{}datetime}\doceval{10\docpipe{}16}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_sys_timestamp:nn,\erw_sys_timestamp:}
+% \begin{syntax}
+% \cs{erw_sys_timestamp:nn}\doceval{date\docpipe{}time\docpipe{}datetime}\doceval{10\docpipe{}16}
+% \end{syntax}
+% \begin{description}
+% \item[Semantics] Timestamp in base 10 or 16
+% \end{description}
+% \end{function}
+% \begin{function}{\erw_sys_timestamp_delimiter:}
+% \begin{syntax}
+% \cs{erw_sys_timestamp_delimiter:}
+% \end{syntax}
+% \end{function}
+%
+% \section{\textsf{tl}}
+% All functions that modify a \meta{\docccepttl} first create it if not exist.
+% \begin{function}{\erw_tl_append_item:nn}
+% \begin{syntax}
+% \cs{erw_tl_append_item:nn}\Arg{arg list}\Arg{arg}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_tl_fold:NN, \erw_tl_fold:cN}
+% \begin{syntax}
+% \cs{erw_tl_fold:NN}\meta{\doccceptcs}\meta{\docccepttlvar}
+% \end{syntax}
+% \end{function}
+% \DocPhantomSection{subsection}{\cs{erw_tl_gset_function:n}}{usage:tl:function}
+% \begin{function}{\erw_tl_gset_function:N, \erw_tl_gset_function:n}
+% \begin{syntax}
+% \cs{erw_tl_gset_function:n}\Arg{\doccceptcode}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_tl_join:nn, \erw_tl_join:nnn, \erw_tl_join:nnnn, \erw_tl_join:nnnnn}
+% \begin{syntax}
+% \cs{erw_tl_join:nn}\Arg{\docccepttl_{1}}\Arg{\docccepttl_{2}}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_tl_last_item:n}
+% \begin{syntax}
+% \cs{erw_tl_last_item:n}\Arg{\docccepttl}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_tl_map:n, \erw_tl_map:Nn}
+% \begin{syntax}
+% \cs{erw_tl_map:n}\Arg{\doccceptitems}
+% \end{syntax}
+% \begin{description}
+% \item[Semantics] Maps over \meta{\doccceptitems} using the internal function set by \nameref{usage:tl:function}
+% \end{description}
+% \end{function}
+% \begin{function}{\erw_tl_map_inline:nn }
+% \begin{syntax}
+% \cs{erw_tl_map_inline:nn}\Arg{\doccceptcode}\Arg{\doccceptitems}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_tl_map_thread:Nn}
+% \begin{syntax}
+% \cs{erw_tl_math_thread:Nn}\meta{\doccceptcs}\doceval{\meta{\doccceptitems}}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_tl_map_thread_at:Nnn}
+% \begin{syntax}
+% \cs{erw_tl_math_thread_at:Nnn}\Arg{\doccceptint{}}\Arg{\docccepttl}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_tl_repeat:nn}
+% \begin{syntax}
+% \cs{erw_tl_repeat:nn}\Arg{\doccceptint{}}\Arg{\docccepttl}
+% \end{syntax}
+% \end{function}
+% \begin{function}{\erw_tl_split:nnn, \erw_tl_split:nn}
+% \begin{syntax}
+% \cs{erw_tl_split:nn}\Arg{\doccceptitems}\Arg{delimiter}
+% \end{syntax}
+% \end{function}
+% \DocPhantomSection{subsection}{\cs{erw_tl_separators:n}}{usage:tl:sep}
+% \begin{function}{\erw_tl_separators:n}
+% \begin{syntax}
+% \cs{erw_tl_separators:n}\Arg{\doccceptitems}
+% \end{syntax}
+% \begin{description}
+% \item[Semantics] According to the count of \meta{\doccceptitems}:
+% \begin{enumerate}[label=\emph{\arabic*)}]
+% \item \Arg{\docccepttl_1}\Arg{\docccepttl_1}\Arg{\docccepttl_1}
+% \item \Arg{\docccepttl_1}\Arg{\docccepttl_2}\Arg{\docccepttl_1\docccepttl_2}
+% \item \Arg{\docccepttl_1}\Arg{\docccepttl_2}\Arg{\docccepttl_3}
+% \end{enumerate}
+% \end{description}
+% \end{function}
+% \clearpage
+%
+% \part{Listing}\label{part:listing}
+%
+% \newtcblisting[auto counter]
+% {listing}[2][]{
+% noparskip,
+% breakable,
+% colback=white,
+% colframe=black,
+% opacitybacktitle=.8,%
+% fonttitle=\bfseries,
+% title={Listing~\thetcbcounter. #1},
+% arc=0pt,
+% outer arc=0pt,
+% boxrule=1pt,
+% listing and text,
+% #2}
+%
+% \section{\textsf{constants}}
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:const}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:const, listing and text}
+ \ExplSyntaxOn
+ \seq_const_from_clist:Nn \foo_seq{ A, B, C }
+ \prop_const_from_keyval:Nn \foo_prop{ A = a, B = b, C = c }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \section{\textsf{cs}}
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:cs:compose}. }
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:cs:compose, listing and text}
+ \ExplSyntaxOn
+ \cs_set:Nn \__foo:n { f(#1) }
+ \cs_set:Nn \__bar:n { g[#1] }
+ \cs_set:Nn \__baz:n { h\{#1\} }
+ \tl_set:Nn \l_tmpa_tl{ X }
+ \erw_cs_compose:NnN \erw_tl_fold:NN{ {\__baz:n}{\__bar:n}{\__foo:n} }\l_tmpa_tl
+ \tl_use:N \l_tmpa_tl
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:cs:compose:c}. }
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:cs:compose:c, listing and text}
+ \ExplSyntaxOn
+ \tl_map_function:nN { {f(#1)} {g[#1]} {h\{#1\}} }\erw_csint_new:n
+ \tl_set:Nn \l_tmpa_tl{X}
+ \exp_args:NNx
+ \erw_cs_compose:NnN \erw_tl_fold:cN
+ {\erw_csint_names_braced:nnn{ 1 }{ 1 }{ 3 }}
+ \l_tmpa_tl
+ \tl_use:N \l_tmpa_tl
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \section{\textsf{csint}}
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:csint}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:csint, listing and text}
+ \ExplSyntaxOn
+ \cs_set:Nn\__foo:n{ f(#1) }
+ \cs_set:Nn\__baz:n{ h\{#1\} }
+ \tl_map_function:nN { {\__foo:n} {g[#1]} {\__baz:n} }\erw_csint_new:n
+ \erw_csint:nn{1}{X},\
+ \erw_csint:nn{2}{X},\
+ \erw_csint:nn{3}{X}.
+ \erw_csint_reset:
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
% \section{\textsf{int}}
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:int:range}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:int:range, listing and text}
+ \ExplSyntaxOn
+ \erw_int_range:nn{ 2 }{ 5 }\\
+ \erw_int_range:n{ 5 }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \section{\textsf{lambda}}
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:lambda}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:lambda, listing and text}
+ \ExplSyntaxOn
+ \tl_set:Nn \l_tmpa_tl
+ {
+ \erw_lambda:nnn \DeclareDocumentCommand{ m }{ Hello,~#1! }
+ }
+ \l_tmpa_tl{ world }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \section{\textsf{prop}}
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:prop:map}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:prop:map, listing and text}
+ \ExplSyntaxOn
+ \erw_prop_map_item:NNN \prop_put:Nnx \baz_prop \foo_prop
+ \prop_if_exist:NTF\baz_prop{T}{F}\\
+ \prop_item:Nn \baz_prop{ A }
+ ,\prop_item:Nn \baz_prop{ B }
+ ,\prop_item:Nn \baz_prop{ C }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:prop:put:keyval}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:prop:put:keyval, listing and text}
+ \ExplSyntaxOn
+ \erw_prop_keyval_parse:NNNn
+ \foo_prop
+ \erw_keyval_error:Nn
+ \prop_put:Nnn{ X = x, Y = y, Z = z}
+ \prop_item:Nn \foo_prop{ X }
+ ,\prop_item:Nn \foo_prop{ Y }
+ ,\prop_item:Nn \foo_prop{ Z }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}{\ref{listing:prop:clist}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:prop:clist, listing and text}
+ \ExplSyntaxOn
+ \erw_prop_to_clist:Nn \foo_prop{ A, B, C }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \section{\textsf{seq}}
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:seq:fold}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:seq:fold, listing and text}
+ \ExplSyntaxOn
+ \cs_set:Nn \__foo:n { f(#1) }
+ \cs_set:Nn \__bar:n { g[#1] }
+ \cs_set:Nn \__baz:n { h\{#1\} }
+ \seq_new:N \l_tmp_seq
+ \seq_put_right:Nn \l_tmp_seq{X}
+ \erw_cs_compose:NnN \erw_seq_fold:NN{ {\__baz:n}{\__bar:n}{\__foo:n} }\l_tmp_seq
+ \seq_item:Nn \l_tmp_seq{ 1 }\\
+ \seq_item:Nn \l_tmp_seq{ 2 }\\
+ \seq_item:Nn \l_tmp_seq{ 3 }\\
+ \seq_item:Nn \l_tmp_seq{ 4 }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:seq:fold:c}. }
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:seq:fold:c, listing and text}
+ \ExplSyntaxOn
+ \cs_set:Nn \__foo:n { f(#1) }
+ \cs_set:Nn \__bar:n { g[#1] }
+ \cs_set:Nn \__baz:n { h\{#1\} }
+ \seq_put_right:Nn \l_tmpa_seq{X}
+ \erw_cs_compose:NnN \erw_seq_fold:cN{ {__baz:n}{__bar:n}{__foo:n} }\l_tmpa_seq
+ \seq_item:Nn \l_tmpa_seq{ 1 }\\
+ \seq_item:Nn \l_tmpa_seq{ 2 }\\
+ \seq_item:Nn \l_tmpa_seq{ 3 }\\
+ \seq_item:Nn \l_tmpa_seq{ 4 }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:seq:prop}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:seq:prop, listing and text}
+ \ExplSyntaxOn
+ \erw_seq_put_right_prop:NNn \bar_seq\foo_prop{ A, B, C }
+ \seq_use:Nn\bar_seq{,}
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:seq:use}. }
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:seq:use, listing and text}
+ \ExplSyntaxOn
+ \seq_put_right:Nn\l_tmpa_seq{ A }
+ \seq_put_right:Nn\l_tmpa_seq{ B }
+ \erw_seq_use:Nn \l_tmpa_seq{ {~and~} }\\
+ \erw_seq_use:Nn \l_tmpa_seq{ {,\ }{~and~} }\\
+ \erw_seq_use:Nn \l_tmpa_seq{ {~and~}{,\ }{,~and~} }\\[1em]
+ \seq_put_right:Nn\l_tmpa_seq{ C }
+ \erw_seq_use:Nn \l_tmpa_seq{ {~and~} }\\
+ \erw_seq_use:Nn \l_tmpa_seq{ {,\ }{and~} }\\
+ \erw_seq_use:Nn \l_tmpa_seq{ {~and~}{,\ }{,~and~} }\\
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \section{\textsf{sys}}
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:sys:alone}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:sys:alone, listing and text}
+ \ExplSyntaxOn
+ \noindent\erw_sys_timestamp:nn{date}{10}{-}
+ \noindent\erw_sys_timestamp:nn{time}{10}\\
+ \noindent\erw_sys_timestamp:nn{datetime}{10}\\
+ \erw_sys_timestamp:nn{date}{16}{\%}
+ \erw_sys_timestamp:nn{time}{16}\\
+ \erw_option:n{ sys / timestamp_delim = {\%} }
+ \erw_sys_timestamp:nn{datetime}{16}\\
+ \erw_sys_jobnametimestamp:
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:sys:iow}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:sys:iow, listing and text}
+ \ExplSyntaxOn
+ \erw_option:n{ sys / timestamp_delim = \c_empty_tl }
+ \iow_new:N \foo_iow
+ \tl_set:Nx \foo_dec { \erw_sys_timestamp:nn{datetime}{10} }
+ \tl_set:Nx \foo_hex { \erw_sys_timestamp: }
+ \iow_open:Nn \foo_iow{ \foo_hex }
+ \iow_now:Nn\foo_iow{ Hello,\ world! }
+ \iow_close:N \foo_iow
+ D:\foo_dec\\
+ \file_timestamp:n{ \foo_hex }\\
+ \file_input:n{ \foo_hex }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \section{\textsf{tl}}
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:tl:fold}. }
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:tl:fold, listing and text}
+ \ExplSyntaxOn
+ \cs_set:Nn \__foo:n { f(#1) }
+ \tl_set:Nn \l_tmpa_tl{ X }
+ \erw_tl_fold:NN\__foo:n\l_tmpa_tl
+ \l_tmpa_tl\\
+ \cs_set:Nn \__bar:n { g[#1] }
+ \erw_tl_fold:cN {__bar:n}\l_tmpa_tl
+ \l_tmpa_tl
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:tl:repeat}. }
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:tl:repeat, listing and text}
+ \ExplSyntaxOn
+ \erw_tl_repeat:nn{ 3 }{ x }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:tl:split}. }
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:tl:split, listing and text}
+ \ExplSyntaxOn
+ \erw_tl_split:nn{ {a} {b} {c} }{ == }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:tl:map}.}
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:tl:map, listing and text}
+ \ExplSyntaxOn
+ \cs_set:Nn \__foo:n { (#1) }
+ \erw_tl_map:Nn \__foo:n{ {a}{b}{c} }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:tl:map:thread}. }
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:tl:map:thread, listing and text}
+ \ExplSyntaxOn
+ \cs_set:Nn \__foo:n { (#1) }
+ \erw_tl_map_thread:Nn \__foo:n
+ {
+ { {a}{b}{c}{d}{e}{f} }
+ }\\
+ \cs_set:Nn\__foo:nn { (#1+#2) }
+ \erw_tl_map_thread:Nn \__foo:nn
+ {
+ { {a}{b}{c}{d}{e}{f} }
+ { {A}{B}{C}{D}{E}{F} }
+ }\\
+ \cs_set:Nn \__foo:nnn { (#1+#2+#3) }
+ \erw_tl_map_thread:Nn \__foo:nnn
+ {
+ { {a}{b}{c}{d}{e}{f} }
+ { {A}{B}{C}{D}{E}{F} }
+ { {k}{l}{m}{n}{o}{p} }
+ }\\
+ \cs_set:Nn \__foo:nnnn { (#1+#2+#3+#4) }
+ \erw_tl_map_thread:Nn \__foo:nnnn
+ {
+ { {a}{b}{c}{d}{e}{f} }
+ { {A}{B}{C}{D}{E}{F} }
+ { {k}{l}{m}{n}{o}{p} }
+ { {K}{L}{M}{N}{O}{P} }
+ }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+% \phantomsection\addcontentsline{toc}{subsection}
+% {\ref{listing:tl:map:thread:at}. }
+% \iffalse
+%<*guardlisting>
+% \fi
+\begin{listing}[]
+ {label=listing:tl:map:thread:at, listing and text}
+ \ExplSyntaxOn
+ \cs_set:Nn\__foo:nn { (#1+#2) }
+ \erw_tl_map_thread_at:Nnn \__foo:nn{ 2 }
+ {
+ { {a}{b}{c}{d}{e}{f} }
+ { {A}{B}{C}{D}{E}{F} }
+ }
+ \ExplSyntaxOff
+\end{listing}
+% \iffalse
+%</guardlisting>
+% \fi
+%
+% \clearpage
+% \part{Other}\label{part:other}
+%
+% \section{Acknowledgment}\label{other:acknowl}
+%
+% This work has benefited from Q\&A's from the \LaTeX community\cite{user-erw}. \nameref{usage:lambda} originally appeared in \cite{a-188053}.
+%
+% \section{Install}\label{other:install}
+% \begin{enumerate}[label=\emph{\arabic*)}]
+% \item Compile \file{\jobname.dtx} (under Unix, \texttt{\$tex timestamp.dtx})
+% \item Put the generated \file{\jobname.sty} in the search path of the \LaTeX engine
+% \end{enumerate}
+%
+% \section{Support}\label{other:support}
+%
+% This package is available from \url{https://www.ctan.org/pkg/\jobname} and \url{https://github.com/rogard/\jobname}.
+%
+% \subsection{Platform}
+% \begin{enumerate}[label=\emph{\roman*)}]
+% \item
+% ^^A uname -a
+% \begin{Verbatim}[breaklines=true]
+% Linux laptop 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
+% \end{Verbatim}
+% \label{plat:lin}
+% \end{enumerate}
+%
+% \subsection{Engine}
+% \begin{enumerate}[label=\emph{\alph*)}]
+% \item
+% \begin{Verbatim}[breaklines=true]
+% pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019)
+% \end{Verbatim}
+% \label{eng:tlxviiii:pdf}
+% \item
+% \begin{Verbatim}[breaklines=true]
+% pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020)
+% \end{Verbatim}
+% \label{eng:tlxx:pdf}
+% \item
+% \begin{Verbatim}[breaklines=true]
+% LuaHBTeX, Version 1.12.0 (TeX Live 2020)
+% \end{Verbatim}
+% \label{eng:tlxx:lua}
+% \item
+% \begin{Verbatim}[breaklines=true]
+% XeTeX 3.14159265-2.6-0.999992 (TeX Live 2020)
+% \end{Verbatim}
+% \label{eng:tlxx:xe}
+% \end{enumerate}
+%
+% \subsection{Results}
+%
+% \begin{enumerate}[label=\emph{\arabic*)}]
+% \item \pkg{\jobname} \docvers{2}{0} compiles satisfactorily on platform \ref{plat:lin} and engines \ref{eng:tlxx:pdf}, \ref{eng:tlxx:lua}, and \ref{eng:tlxx:xe}
+% \end{enumerate}
+%
+% \DocPhantomSection*{section}{References}{other:bib}
+% \begin{thebibliography}{1}
+% \bibitem{interface3} The \LaTeX3 Project Team {\em The \LaTeX3 interfaces}, 2019,
+% \url{http://ftp.math.purdue.edu/mirrors/ctan.org/macros/latex/contrib/l3kernel/interface3.pdf}
+% \bibitem{l3build} The \LaTeX3 Project Team {\em The \pkg{l3build} package}, 2020,
+% \url{http://mirror.utexas.edu/ctan/macros/latex/contrib/l3build/l3build.pdf}
+% \bibitem{a-188053} \href{https://tex.stackexchange.com/users/17423/sean-allred}{@{}sean-allred}'s answer to
+% ``How to create lambda expressions?'', \url{https://tex.stackexchange.com/a/188053/112708}
+% \bibitem{user-erw} \url{https://tex.stackexchange.com/users/112708/erwann?tab=questions}
+% \end{thebibliography}
%
-% \subsection{\textsf{backend}}
-%
-% \begin{Listing}
-% \verb|\ExplSyntaxOn|\ExplSyntaxOn
-% \\\verb|\erw_int_range:nn{2}{5}|\erwtab\erw_int_range:nn{2}{5}
-% \\\verb|\erw_int_range:n{5}|\erwtab\erw_int_range:n{5}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:int:range}
-% \end{Listing}
-%
-% \section{\textsf{map}}
-%
-% \subsection{\textsf{backend}}
+% \section{To do}
%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn| \ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo #1 {(#1)}|\cs_set:Npn \__foo #1 {(#1)}
-% \\\verb|\erw_map:Nn \__foo{{a}{b}{c}}|\erwtab\erw_map:Nn \__foo{{a}{b}{c}}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:map}
-% \end{Listing}
+% \begin{enumerate}[label=\emph{\alph*)}]
+% \item Regression testing using \cite[Section 3.2—Specifying expectations]{l3build}. \label{todo:regtest}
+% \end{enumerate}
+% Also see:
+% \begin{enumerate}[label=\emph{\alph*)}]
+% \setcounter{enumi}{1}
+% \item \env{NOTE} or \cs{NB} tagged \texttt{abandon\docpipe{}done\docpipe{}todo} inside \jobname|.dtx|
+% \end{enumerate}
%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn| \ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo #1 {(#1)}|\cs_set:Npn \__foo #1 {(#1)}
-% \\\verb|\erw_map_inline:nn{|
-% \\\verb| (#1)}{{a}{b}{c}}| \erwtab\erw_map_inline:nn{(#1)}{{a}{b}{c}}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:mapinl}
-% \end{Listing}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\ExplSyntaxOn|\ExplSyntaxOn
-% \\\verb|\cs_set:Npn \__foo:n #1 {(#1)}|\cs_set:Npn \__foo:n #1 {(#1)}
-% \\\verb|\erw_map_thread:Nn \__foo:n|
-% \\\verb|{|
-% \\\verb| {{a}{b}{c}{d}{e}{f}}|
-% \\\verb|}|\erwtab\erw_map_thread:Nn \__foo:n
-% {
-% {{a}{b}{c}{d}{e}{f}}
-% }
-% \\\verb|\cs_set:Npn \__foo:nn #1 #2|
-% \\\verb| {(#1+#2)}|\cs_set:Npn \__foo:nn #1 #2 {(#1+#2)}
-% \\\verb|\erw_map_thread:Nn \__foo:nn|
-% \\\verb|{|
-% \\\verb| {{a}{b}{c}{d}{e}{f}}|
-% \\\verb| {{A}{B}{C}{D}{E}{F}}|
-% \\\verb|}|\erwtab\erw_map_thread:Nn \__foo:nn
-% {
-% {{a}{b}{c}{d}{e}{f}}
-% {{A}{B}{C}{D}{E}{F}}
+% \changes{\docvers{1}{1}}{2018/05/23}{Brought all the modules under one file; renamed \pkg{l3erw} to \pkg{erw-l3};}
+% \changes{\docvers{1}{1}}{2018/05/23}{\cs{numbrdcsnew} changed to \cs{newnumbrdcs} and made 'disambiguable'}
+% \changes{\docvers{1}{1}}{2018/05/23}{\pkg{disambig}/backend: changes to the key, added \cs{ProcessPackageKeysOption};}
+% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{erw_items_to}}
+% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{erw_last_item}}
+% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{erw_repeat}}
+% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{erw_split}}
+% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{map_thread}}
+% \changes{\docvers{1}{2}}{2018/06/21}{Front end cmds no longer generated with module \pkg{disambig}; Option of the same name deleted;}
+% \changes{\docvers{1}{2}}{2018/06/21}{Rearrange: the doc to clearly separate frontend from backend}
+% \changes{\docvers{1}{2}}{2018/06/21}{Modify: \cs{erw_compose}, order in which functions composed ($g\circ f$ means $f$ comes before $g$)}
+% \changes{\docvers{1}{2}}{2018/06/21}{\pkg{disambig}: pushed the code inside \cs{keys_define};}
+% \changes{\docvers{1}{2}}{2018/06/21}{\pkg{disambig}: \cs{disambignewcmd} no longer takes a token name as arg, rather a token.}
+% \changes{\docvers{1}{3}}{2018/06/22}{Replace: versioning, should have been 0.1.2}
+% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_accum}}
+% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_int_range}}
+% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_is_matrix} (to check arg of \cs{erw_tl_map_thread:Nn})}
+% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_merge}}
+% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_set_map_inline}}
+% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_set_map}}
+% \changes{\docvers{1}{4}}{2018/06/22}{Remove: \doccs{erw_items_to} (redundant with \cs{tl_range:nnn})}
+% \changes{\docvers{1}{5}}{2019/12/12}{Modify: source repository}
+% \changes{\docvers{1}{5}}{2019/12/12}{Rearrange: frontend/backend sections}
+% \changes{\docvers{1}{5}}{2019/12/12}{Remove: \pkg{disambig}}
+% \changes{\docvers{1}{5}}{2019/12/12}{Split Section Preliminaries into Conventions and Requirement.}
+% \changes{\docvers{1}{6}}{2020/02/05}{Fix: critical bug preventing \pkg{erw-l3} from working without explicit inclusion of \pkg{expl3}}
+% \changes{\docvers{1}{7}}{2020/04/24}{Add: \nameref{impl:option}}
+% \changes{\docvers{1}{7}}{2020/04/24}{Add: \nameref{impl:sys}}
+% \changes{\docvers{1}{7}}{2020/04/24}{Move: \cs{erw_fold_apply_par:n}}
+% \changes{\docvers{1}{7}}{2020/04/24}{Move: \cs{erw_fold_set_par:n}}
+% \changes{\docvers{1}{7}}{2020/04/24}{(deleted)}
+% \changes{\docvers{1}{7}}{2020/04/24}{Remove: \doccs{numbrdcsnew}, \doccs{numbrdcs}}
+% \changes{\docvers{1}{7}}{2020/04/24}{Rename: variables with suffix |tl| get 'private mode' prexif in pl. of |\__erw| }
+% \changes{\docvers{1}{7}}{2020/04/24}{Rename: |csnum| to |csint| }
+% \changes{\docvers{1}{7}}{2020/04/24}{Rename: |numbrd_cs| to |csnum| }
+% \changes{\docvers{1}{7}}{2020/04/24}{Replace: listing's implem with that of \pkg{tocloft}}
+% \changes{\docvers{1}{7}}{2020/04/24}{Replace: vers. numb. from 3 to 2 digits}
+% \changes{\docvers{1}{8}}{2020/04/24}{Add: \env{function} for all frontend functions.}
+% \changes{\docvers{1}{8}}{2020/04/30}{Remove: \doccs{erw_cs_set_eq:NN} and variants}
+% \changes{\docvers{1}{8}}{2020/04/30}{Remove: \doccs{erw_is_matrix:n} (predicate must be expandable)}
+% \changes{\docvers{1}{8}}{2020/04/30}{Rename: all cs prefixes to agree with heading under which they come, e.g. \cs{erw_identity:n} by \cs{erw_cs_identity:n} }
+% \changes{\docvers{1}{8}}{2020/04/30}{(deleted)}
+% \changes{\docvers{1}{8}}{2020/04/30}{Replace: \cs{erw_seq_fold:NN} by \cs{erw_oper_fold_seq:NN} and likewise for variants}
+% \changes{\docvers{1}{8}}{2020/04/30}{(deleted)}
+% \changes{\docvers{1}{9}}{2020/05/01}{Add: \cs{erw_sys_timestamp_delimiter:}}
+% \changes{\docvers{1}{9}}{2020/05/01}{Add: \cs{erw_tl_join:nn} and variants}
+% \changes{\docvers{1}{9}}{2020/05/01}{Rename: \cs{erw_append_arg:nn} to \cs{erw_tl_append_item:nn}}
+% \changes{\docvers{1}{9}}{2020/05/01}{Rename: \cs{erw_oper_gset_function:N} to \cs{erw_tl_gset_function:N} (and variants)}
+% \changes{\docvers{1}{9}}{2020/05/01}{Rename: prefix |timestamp| by |sys|}
+% \changes{\docvers{2}{0}}{2020/05/01}{Add: \cs{erw_jobnametimestamp:nn} and variants}
+% \changes{\docvers{2}{0}}{2020/05/01}{Remove: \doccs{merge:nn} (redundant with \cs{erw_join:nn})}
+% \changes{\docvers{2}{0}}{2020/05/01}{Rename: \docvers{0}{0} to \docvers{1}{0}, etc.}
+% \changes{\docvers{2}{1}}{2020/05/09}{Add: \cs{erw_prop_to_clist:Nn}, \cs{erw_prop_put:NN}, and \cs{erw_prop_put:Nnn}}
+% \changes{\docvers{2}{1}}{2020/05/09}{Add: \cs{erw_seq_from_clist:Nn}, \cs{erw_seq_from_prop:NNn}, and \cs{erw_seq_put_right:Nn}}
+% \changes{\docvers{2}{1}}{2020/05/09}{(delete)}
+% \changes{\docvers{2}{1}}{2020/05/09}{Replace: \cs{erw_seq_fold:NN} by \cs{__erw_seq_fold:NN}}
+% \changes{\docvers{2}{2}}{2020/05/18}{Add: \cs{erw_seq_use:Nn}}
+% \changes{\docvers{2}{2}}{2020/05/18}{Add: \cs{erw_tl_separators:n}}
+% \changes{\docvers{2}{3}}{2020/05/20}{Add: \cs{msg_new:nnn}\doceval{erw}\doceval{csnset}}
+% \changes{\docvers{2}{3}}{2020/05/20}{Add: \cs{msg_new:nnn}\doceval{erw}\doceval{keyval/\dots}}
+% \changes{\docvers{2}{3}}{2020/05/20}{Fix: 'mark as private code' (hiherto unnoticed)}
+% \changes{\docvers{2}{3}}{2020/05/20}{Modify: behavior of \cs{erw_seq_use:Nn}}
+% \changes{\docvers{2}{3}}{2020/05/20}{Move: all \cs{msg_new:Nnnn} statements under same heading}
+% \changes{\docvers{2}{4}}{2020/05/21}{Add: \cs{erw_lambda:nnn}}
+% \changes{\docvers{2}{5}}{2020/05/22}{Add: \cs{erw_prop_put_keyval:Nn}}
+% \changes{\docvers{2}{6}}{2020/05/22}{Add: \cs{erw_keyval_parse:NNNn}}
+% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{erw_cs_error:nn}}
+% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{erw_cs_error:n}}
+% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{erw_prop_keyval_parse:NNNn}}
+% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{erw_prop_map_item:NNN} }
+% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{msg_new:nnn}\doceval{erw}\doceval{varnset}}
+% \changes{\docvers{2}{6}}{2020/05/23}{Remove: \doccs{erw_cs_apply}}
+% \changes{\docvers{2}{6}}{2020/05/23}{Remove: \doccs{erw_prop_put:NN} }
+% \changes{\docvers{2}{6}}{2020/05/23}{Remove: \doccs{erw_prop_put_keyval:Nn} }
+% \changes{\docvers{2}{6}}{2020/05/23}{Remove: \cs{msg_new:nnn}, module \texttt{erw}, messages: \texttt{keyval/\dots}}
+% \changes{\docvers{2}{6}}{2020/05/23}{Rename: \textsf{basics} to \nameref{usage:cs}}
+% \changes{\docvers{2}{6}}{2020/05/23}{Replace: \cs{erw_seq_from_clist} by \cs{erw_seq_put_right_clist}}
+% \changes{\docvers{2}{6}}{2020/05/23}{Replace: \cs{erw_seq_from_prop} by \cs{erw_seq_put_right_prop}}
+% \changes{\docvers{2}{7}}{2020/05/23}{Remove: \doccs{erw_cs_error:n} }
+% \changes{\docvers{2}{7}}{2020/05/23}{Remove: \doccs{erw_cs_error:nn} }
+% \changes{\docvers{2}{7}}{2020/05/23}{Add: \cs{erw_keyval_error:Nn} }
+% \changes{\docvers{2}{7}}{2020/05/23}{Add: \cs{erw_keyval_error:Nnn} }
+% \changes{\docvers{2}{8}}{2020/05/24}{Add: \cs{msg_new:nnn}\doceval{erw}\doceval{notset}}
+% \changes{\docvers{2}{8}}{2020/05/24}{Remove: \cs{msg_new:nnn}\doceval{erw}\doceval{csnset}}
+% \changes{\docvers{2}{8}}{2020/05/24}{Remove: \cs{msg_new:nnn}\doceval{erw}\doceval{varnset}}
+% \changes{\docvers{2}{9}}{2020/05/27}{Add: \cs{erw_seq_fold:NN}, \cs{erw_seq_fold:cN}}
+% \changes{\docvers{2}{9}}{2020/05/27}{Add: \cs{erw_cs_compose:NnN}}
+% \changes{\docvers{2}{9}}{2020/05/27}{Remove: \doccs{erw_seq_compose:nN},\doccs{erw_seq_compose_c:nN},\doccs{erw_seq_compose_vers:nN}}
+% \changes{\docvers{2}{9}}{2020/05/27}{Remove:
+% \doccs{erw_tl_compose:nN},
+% \doccs{erw_tl_compose:Nnn},
+% \doccs{erw_tl_compose:nn},
+% \doccs{erw_tl_compose_c:nN},
+% \doccs{erw_tl_compose_c:nn},
+% \doccs{erw_tl_compose_vers:nN},
+% \doccs{erw_tl_compose_vers:nn}
% }
-% \\\verb|\cs_set:Npn \__foo:nnn|
-% \\\verb| #1 #2 #3 |
-% \\\verb| {(#1+#2+#3)}|\cs_set:Npn \__foo:nnn #1 #2 #3 {(#1+#2+#3)}
-% \\\verb|\erw_map_thread:Nn \__foo:nnn|
-% \\\verb|{|
-% \\\verb| {{a}{b}{c}{d}{e}{f}}|
-% \\\verb| {{A}{B}{C}{D}{E}{F}}|
-% \\\verb| {{k}{l}{m}{n}{o}{p}}|
-% \\\verb|}|\erwtab[0.3]\erw_map_thread:Nn \__foo:nnn
-% {
-% {{a}{b}{c}{d}{e}{f}}
-% {{A}{B}{C}{D}{E}{F}}
-% {{k}{l}{m}{n}{o}{p}}
-% }
-% \\\verb|\cs_set:Npn \__foo:nnnn|
-% \\\verb| #1 #2 #3 #4 |
-% \\\verb| {(#1+#2+#3+#4)}|\cs_set:Npn \__foo:nnnn #1 #2 #3 #4 {(#1+#2+#3+#4)}
-% \\\verb|\erw_map_thread:Nn \__foo:nnnn|
-% \\\verb|{|
-% \\\verb| {{a}{b}{c}{d}{e}{f}}|
-% \\\verb| {{A}{B}{C}{D}{E}{F}}|
-% \\\verb| {{k}{l}{m}{n}{o}{p}}|
-% \\\verb| {{K}{L}{M}{N}{O}{P}}|
-% \\\verb|}|\erwtab[0.1]\erw_map_thread:Nn \__foo:nnnn
-% {
-% {{a}{b}{c}{d}{e}{f}}
-% {{A}{B}{C}{D}{E}{F}}
-% {{k}{l}{m}{n}{o}{p}}
-% {{K}{L}{M}{N}{O}{P}}
+% \changes{\docvers{2}{9}}{2020/05/27}{Rename: \texttt{oper / fold_set_par} to \texttt{tl / fold_set_par} }
+% \changes{\docvers{2}{9}}{2020/05/27}{Rename: \texttt{oper / fold_apply_par} to \texttt{tl / fold_apply_par} }
+% \changes{\docvers{3}{0}}{2020/06/03}{Fix: warning \pkg{csquotes}+\pkg{fvextra} }
+% \changes{\docvers{3}{1}}{2020/06/04}{Miscellaneous}
+% \PrintChanges
+% \PrintIndex
+% \clearpage
+% \StopEventually{
+% ^^A \PrintChanges
+% ^^A \PrintIndex
% }
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{ }\label{listng:thread}
-% \end{Listing}
-%
-% \begin{Listing}
-% \verb|\ExplSyntaxOn|\ExplSyntaxOn
-% \\\verb|\cs_set_protected:Npn \__foo:nn #1 #2|
-% \\\verb| {(#1+#2)}| \cs_set_protected:Npn \__foo:nn #1 #2 {(#1+#2)}
-% \\\verb|\erw_map_thread:Nn|
-% \\\verb| \__foo:nn |
-% \\\verb| { |
-% \\\verb| {{1}{2}{3}} |
-% \\\verb| {{a}{b}{c}}|
-% \\\verb| }|\erwtab\erw_map_thread:Nn
-% \__foo:nn
-% {
-% {{1}{2}{3}}
-% {{a}{b}{c}}
-% }
-% \\\verb|\exp_last_unbraced:Nx|
-% \\\verb|\erw_map_thread:Nn|
-% \\\verb|{|
-% \\\verb| \__foo:nn |
-% \\\verb| { |
-% \\\verb| {\erw_int_range:n{3}} |
-% \\\verb| {{a}{b}{c}}|
-% \\\verb| }|
-% \\\verb|}| \erwtab
-% \exp_last_unbraced:Nx
-% \erw_map_thread:Nn
-% {
-% \__foo:nn
-% {
-% {\erw_int_range:n{3}}
-% {{a}{b}{c}}
-% }
-% }\erwtab[0.7]{\color{red} (does~not~thread!)}
-% \\\verb|\exp_last_unbraced:Nx|
-% \\\verb|\erw_map_thread:Nn|
-% \\\verb|{|
-% \\\verb| \__foo:nn |
-% \\\verb| { |
-% \\\verb| {\int_step_inline:nn{3}{#1}} |
-% \\\verb| {{a}{b}{c}}|
-% \\\verb| }|
-% \\\verb|}|
-% \erwtab[0.2]{\color{red} \verb|Illegal parameter number in definition of \l__exp_internal_tl!|}
-% \\\verb|\ExplSyntaxOff|\ExplSyntaxOff
-% \caption{Debugging~for~\cs{erw_map_indexed}}\label{listng:mapindexed}
-% \end{Listing}
-%
-% \section{\textsf{numbrdcs}}
-%
-% \subsection{\textsf{backend}}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\NewDocumentCommand{\myfoo}{m}{f(#1)}|\NewDocumentCommand{\myfoo}{m}{f(#1)}
-% \\\verb|\NewDocumentCommand{\mybar}{m}{g[#1]}|\NewDocumentCommand{\mybar}{m}{g[#1]}
-% \\\verb|\NewDocumentCommand{\mybaz}{m}{h\{#1\}}|\NewDocumentCommand{\mybaz}{m}{h\{#1\}}
-% \\\verb|\numbrdcsnew{{\mybaz}{g[#1]}{\myfoo}}|\numbrdcsnew{{\mybaz}{g[#1]}{\myfoo}}
-% \\\verb|\ExplSyntaxOn|
-% \\\verb|\exp_last_unbraced:Nx|
-% \\\verb| \erw_compose_c:nn|
-% \\\verb| {|
-% \\\verb| {\erw_numbrd_cs_names_braced:|
-% \\\verb| nnn{1}{1}{3}}|
-% \\\verb| {X}|
-% \\\verb| }|
-% \\\verb|\ExplSyntaxOff|\erwtab
-% \ExplSyntaxOn
-% \exp_last_unbraced:Nx
-% \erw_compose_c:nn
-% {{\erw_numbrd_cs_names_braced:nnn{1}{1}{3}}
-% {X}}
-% \ExplSyntaxOff
-% \caption{ }\label{listng:numbrdcs:names}
-% \end{Listing}
-%
-% \subsection{frontend}
-%
-% \vspace*{\fill}
-% \begin{Listing}
-% \verb|\NewDocumentCommand{\thefoo}{m}{f(#1)}|\NewDocumentCommand{\thefoo}{m}{f(#1)}
-% \\\verb|\NewDocumentCommand{\thebar}{m}{g[#1]}|\NewDocumentCommand{\thebar}{m}{g[#1]}
-% \\\verb|\NewDocumentCommand{\thebaz}{m}{h\{#1\}}|\NewDocumentCommand{\thebaz}{m}{h\{#1\}}
-% \\\verb|\numbrdcsnew{|
-% \\\verb| {\thefoo}|
-% \\\verb| {g[#1]}|
-% \\\verb| {\thebaz}}|\erwtab\numbrdcsnew{{\thefoo}{g[#1]}{\thebaz}}
-% \\\verb|\numbrdcs{1}{X}|\erwtab\numbrdcs{1}{X}
-% \\\verb|\numbrdcs{2}{X}|\erwtab\numbrdcs{2}{X}
-% \\\verb|\numbrdcs{3}{X}|\erwtab\numbrdcs{3}{X}
-% \\\verb|\numbrdcsnew*{|
-% \\\verb| {\thefoo}|
-% \\\verb| {g[#1]}|
-% \\\verb| {\thebaz}}|\erwtab\numbrdcsnew*{{\thefoo}{g[#1]}{\thebaz}}
-% \\\verb|\numbrdcs{4}{X}|\erwtab\numbrdcs{4}{X}
-% \\\verb|\numbrdcs{5}{X}|\erwtab\numbrdcs{5}{X}
-% \\\verb|\numbrdcs{6}{X}|\erwtab\numbrdcs{6}{X}
-% \caption{ }\label{listng:numbrdcs}
-% \end{Listing}
-%
-%
-%\StopEventually{^^A
-% \PrintChanges
-% \PrintIndex
-%}
-%
-% \part{Implementation}\label{part:impl}
-%
-% \iffalse
-%<*package>
-% \fi
+% \end{documentation}
+% \begin{implementation}
+% \part{Implementation}\label{part:impl}
+%
+% \section{Opening}
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ExplSyntaxOn
-\msg_new:nnn{erw}{generic}{#1}
+%<*package>
+%<@@=erw>
+% \ExplSyntaxOn
+% \end{macrocode}
+% \section{\textsf{cs}}
+% \label{impl:cs}
+% \subsection{backend}
+% \begin{macrocode}
+\cs_new:Nn \@@_cs_name:N
+{
+ \exp_last_unbraced:Nf \use_i:nnn {\cs_split_function:N #1}
+}
% \end{macrocode}
-% \section{\textsf{compose}}
-% \subsection{backend}
+% \subsection{frontend}\label{basics:frontend}
+% \begin{macro}{\erw_cs_compose:NnN}
% \begin{macrocode}
-\cs_set:Npn \erw_compose:NnV
- #1 % method
- #2 % funs
- #3 % var
+\cs_new:Nn \erw_cs_compose:NnN
{
- \erw_fold_set_par:n{Nf}
- \erw_fold_apply_par:n{Nf}
- \erw_cs_set_inline:Nn \__erw_map:n
+ \erw_cs_set_inline:Nn \g@@_tl_function:n
{
- #1{##1}#3
+ #1{##1}#3
}
- \exp_args:Nf\erw_map:n
+ \exp_args:Nf\erw_tl_map:n
{
- \tl_reverse:n{#2}
+ \tl_reverse:n{#2}
}
}
-\cs_set:Npn \erw_compose:nV #1 #2
-{
- \erw_compose:NnV \erw_fold:NV {#1} #2
-}
-\cs_set:Npn \erw_compose_c:nV #1 #2
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\erw_cs_identity:n}
+% \begin{macrocode}
+\cs_set:Npn \erw_cs_identity:n #1{#1}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\erw_cs_set_inline:Nn, \erw_cs_gset_inline:Nn}
+% \begin{macrocode}
+\cs_new_protected:Nn \erw_cs_set_inline:Nn
{
- \erw_compose:NnV \erw_fold:cV {#1} #2
+ \cs_set:Npn #1 ##1{#2}
}
-\tl_new:N \__erw_compose_tl
-\cs_set:Npn \erw_compose:nn #1 #2
+\cs_generate_variant:Nn \erw_cs_set_inline:Nn {cn}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\erw_cs_gset_inline:Nn}
+% \begin{macrocode}
+\cs_new:Nn \erw_cs_gset_inline:Nn
{
- \tl_set:Nn \__erw_compose_tl {#2}
- \erw_compose:nV{#1}\__erw_compose_tl
- \__erw_compose_tl
+ \cs_gset:Npn #1 ##1{#2}
}
-\cs_set:Npn \erw_compose_c:nn #1 #2
+\cs_generate_variant:Nn \erw_cs_gset_inline:Nn {cn}
+% \end{macrocode}
+% \end{macro}
+% \section{\textsf{csint}}
+% \label{impl:csint}
+% \subsection{backend}
+% \begin{macrocode}
+\int_new:N \g@@_csint_int
+\cs_new:Nn \@@_csint_name: {\erw_csint_name:n{\g@@_csint_int}}
+% \end{macrocode}
+% \subsection{frontend}
+% \begin{macro}{\erw_csint:nn}
+% \begin{macrocode}
+\cs_new:Nn \erw_csint:nn
{
- \tl_set:Nn \__erw_compose_tl {#2}
- \erw_compose_c:nV{#1}\__erw_compose_tl
- \__erw_compose_tl
+ \exp_args:No \use:c{\erw_csint_name:n{#1}}{#2}
}
-\cs_set:Npn \erw_compose_seq:nV #1 #2
-{
- \erw_compose:NnV \erw_fold_seq:NV {#1} #2
+% \end{macrocode}
+% \end{macro}
+%^^A% \begin{macro}{\erw_csint_list:nnn}%^^A TODO
+%^^A% \begin{macrocode}
+%^^A\cs_new:Nn \erw_csint_list:nnn
+%^^A{
+%^^A \int_step_inline:nnnn { #1 }{ #2 }{ #3 }
+%^^A {
+%^^A { \exp_args:No \use:c{\erw_csint_name:n{##1}} }
+%^^A }
+%^^A}
+%^^A% \end{macrocode}
+%^^A% \end{macro}
+% \begin{macro}{\erw_csint_name:n}
+% \begin{macrocode}
+\cs_new:Nn \erw_csint_name:n {@@_csint_\int_to_alph:n{#1}:n}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\erw_csint_new:n}
+% \begin{macrocode}
+\cs_new_protected:Nn \erw_csint_new:n
+{
+ \int_incr:N \g@@_csint_int
+ \exp_args:No
+ \erw_cs_set_inline:cn{\@@_csint_name:}
+ {
+ \token_if_cs:NTF
+ {#1}
+ {#1{##1}}
+ {#1}
+ }
}
-\cs_set:Npn \erw_compose_seq_c:nV
- #1 % funs
- #2 % seq
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\erw_csint_names_braced:nnn,\erw_csint_names_braced:n,\erw_csint_names_braced:}
+% \begin{macrocode}
+\cs_new:Nn \erw_csint_names_braced:nnn
{
- \erw_compose:NnV \erw_fold_seq:cV {#1} #2
+ \int_step_function:nnnN { #1 }{ #2 }{ #3 } \erw_csint_names_braced:n
+ % TODO \tl_range_braced:nnn?
}
-\cs_set:Npn \erw_compose_vers:nV #1 #2
+\cs_new:Nn \erw_csint_names_braced:n {{\erw_csint_name:n{#1}}}
+\cs_new:Nn \erw_csint_names_braced:
{
- \msg_error:nnn{erw}{generic}{erw_compose_vers:nV~yet-to~be~implemented}
+ \erw_csint_names_braced:nnn{1}{1}{\g@@_csint_int}
}
-\cs_set:Npn \erw_compose_seq_vers:nV #1 #2
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\erw_csint_reset:}
+% \begin{macrocode}
+\cs_new_protected:Nn \erw_csint_reset:
{
- \msg_error:nnn{erw}{generic}{erw_compose_vers:nV~yet-to~be~implemented}
+ \int_zero:N \g@@_csint_int
+ \tl_set:Nn \@@_csint_ext_tl{}%^^A TODO remove?
}
-\cs_set:Npn \erw_compose_vers:nn #1 #2
+% \end{macrocode}
+% \end{macro}
+% \section{\textsf{int}}
+% \label{impl:int}
+% \subsection{backend}
+% \begin{macrocode}
+\cs_set:Npn \@@_int_range:nnn #1 #2 #3
{
- \erw_numbrd_cs_reset:{}
- \tl_map_function:nN{#1}\erw_numbrd_cs_new:n
- \exp_last_unbraced:Nx
- \erw_compose_c:nn
- {{\erw_numbrd_cs_names_braced:{}}}
- {#2}
+ \int_compare:nNnTF
+ {
+ \int_eval:n{#2+1}
+ }>{#3}
+ {
+ {#1}
+ }
+ {
+ \@@_int_range:nnn
+ {
+ \exp_args:Nx\erw_tl_append_item:nn{#1}
+ {
+ \int_eval:n{#2+1}
+ }
+ }
+ {\int_eval:n{#2+1}}
+ {#3}
+ }
}
% \end{macrocode}
-% \section{\textsf{csutil}}
-% \subsection{\textsf{backend}}
+% \subsection{frontend}
+% \begin{macro}{\erw_int_range:nn, \erw_int_range:n }
% \begin{macrocode}
-\cs_set:Npn \erw_accum:nn #1 #2
+\cs_new:Nn \erw_int_range:nn
{
- {#1{#2}}
+ \@@_int_range:nnn {{#1}}{#1}{#2}
}
-\cs_set:Npn \__erw_cs_name:N #1
+\cs_new:Nn \erw_int_range:n
{
- \exp_last_unbraced:Nf \use_i:nnn {\cs_split_function:N #1}
+ \@@_int_range:nnn {}{0}{#1}
+% ^^A Alt to:
+% ^^A \int_step_inline:nn {#1}{##1}
}
-\cs_set:Npn \erw_apply:Nn
- #1 % fun
- #2 % tl
+% \end{macrocode}
+% \end{macro}
+% \section{\textsf{keys}}
+% \subsection{frontend}
+% \begin{macro}{\erw_keyval_error:Nn,\erw_keyval_error:Nnn}
+% \begin{macrocode}
+\cs_new:Nn \erw_keyval_error:Nn{\msg_error:nnnnn{@@}{keyval/n}{\erw_keyval_error:Nn}{#1}{#2}}
+\cs_new:Nn \erw_keyval_error:Nnn{\msg_error:nnnnnn{@@}{keyval/nn}{\erw_keyval_error:Nnn}{#1}{#2}{#3}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\erw_keyval_parse:NNNn}
+% \begin{macrocode}
+\cs_new_protected:Nn\erw_keyval_parse:NNNn
{
- #1{#2}
+ \cs_set_protected:Nn \@@_keyval_function:n {#2 #1{##1}}
+ \cs_set_protected:Nn \@@_keyval_function:nn {#3 #1{##1}{##2}}
+ \keyval_parse:NNn
+ \@@_keyval_function:n
+ \@@_keyval_function:nn
+ {#4}
}
-\cs_generate_variant:Nn \erw_apply:Nn {No, Nf, Nx, c}
-\cs_set:Npn \erw_cs_set_eq:NN #1 #2
+% \end{macrocode}
+% \end{macro}
+% \section{\texttt{lambda}}
+% \begin{macro}{\erw_lambda:nnn}
+% \begin{macrocode}
+\cs_new_protected:Npn \erw_lambda:nnn #1 #2 #3
{
- \cs_set:Npn #1 ##1{#2{##1}}
+ \exp_args:NNx
+ #1 \@@_lambda_expression
+ {#2}
+ {#3}
+ \@@_lambda_expression
}
-\cs_generate_variant:Nn \erw_cs_set_eq:NN {cN}
-\cs_set:Npn \erw_cs_gset_eq:NN #1 #2
+% \end{macrocode}
+% \end{macro}
+% \section{\textsf{msg}}
+% \label{impl:msg}
+% \subsection{backend}
+% \begin{macrocode}
+\msg_new:nnn{@@}{generic}{#1}
+\msg_new:nnn{@@}{keyval/nn}{#1#2{#3}{#4};~encountered~key=val~where~only~key~required}
+\msg_new:nnn{@@}{keyval/n}{#1#2{#3};~encountered~key~~where~only~key=val~required}
+\msg_new:nnn{@@}{separ}{#1~expects~1~to~3~items,~#2}
+\msg_new:nnn{@@}{timestamp / base}{Calling~#1,~arg~must~be~'dec|hex'}
+\msg_new:nnn{@@}{timestamp / period}{Calling~#1,~arg~must~be~'date|time|datetime'}
+% \end{macrocode}
+% \subsection{frontend}
+% \begin{macrocode}
+\msg_new:nnn{erw}{notset}{#1~not~set}
+% \end{macrocode}
+% \section{\textsf{prop}}
+% \subsection{backend}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_prop_map_item:NNN
{
- \cs_gset:Npn #1 ##1{#2{##1}}
+ \cs_set_protected:Nn \@@_function:nn
+ {
+ #1 #2 {##1}{##2}
+ }
+ \prop_map_function:NN #3 \@@_function:nn
}
-\cs_generate_variant:Nn \erw_cs_gset_eq:NN {cN}
-\cs_set:Npn \erw_cs_set_inline:Nn #1 #2
+% \end{macrocode}
+% \subsection{frontend}
+% \begin{macro}{\erw_prop_to_clist:Nn}
+% \begin{macrocode}
+\cs_new_protected:Nn \erw_prop_to_clist:Nn
{
- \cs_set:Npn #1 ##1{#2}
+ \cs_set:Nn \@@_keyval_function:n {,\prop_item:Nn#1{##1}}
+ \exp_args:Nf
+ \tl_tail:n
+ {
+ \keyval_parse:NNn
+ \@@_keyval_function:n
+ \erw_keyval_error:Nnn
+ {#2}
+ }
}
-\cs_generate_variant:Nn \erw_cs_set_inline:Nn {cn}
-\cs_set:Npn \erw_cs_gset_inline:Nn #1 #2
+\cs_generate_variant:Nn \erw_prop_to_clist:Nn { c }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\erw_prop_map_item:NNN}
+% \begin{macrocode}
+\cs_new_protected:Nn \erw_prop_map_item:NNN
{
- \cs_gset:Npn #1 ##1{#2}
+ \prop_if_exist:NTF #2
+ {\@@_prop_map_item:NNN #1#2#3}
+ {
+ \prop_new:N #2
+ \erw_prop_map_item:NNN #1#2#3
+ }
}
-\cs_generate_variant:Nn \erw_cs_gset_inline:Nn {cn}
-\tl_set:Nn \__erw_fold_set_par_tl{\c_novalue_tl}
-\tl_set:Nn \__erw_fold_apply_par_tl{\c_novalue_tl}
-\cs_set:Npn \erw_fold_set_par:n #1
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\erw_prop_keyval_parse:NNNn}
+% \begin{macrocode}
+\cs_new_protected:Nn\erw_prop_keyval_parse:NNNn
{
- \tl_set:Nn \__erw_fold_set_par_tl{#1}
+ \prop_if_exist:NTF#1
+ {\erw_keyval_parse:NNNn #1#2#3{#4}}
+ {
+ \prop_new:N #1
+ \erw_prop_keyval_parse:NNNn#1#2#3{#4}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \section{\textsf{oper}}
+% \label{impl:oper}
+% \subsection{backend}
+% \subsection{frontend}
+% \begin{macrocode}
+\keys_define:nn{@@}
+{
+ tl/fold_set_par.tl_gset:N = \g@@_tl_fold_set_par_tl,
+ tl/fold_set_par.value_required:n = true,
+ tl/fold_set_par.default:n = {Nf},
+ tl/fold_set_par.initial:n = {Nf},
+ tl/fold_apply_par.tl_gset:N = \g@@_tl_fold_apply_par_tl,
+ tl/fold_apply_par.value_required:n = true,
+ tl/fold_apply_par.default:n = {Nf},
+ tl/fold_apply_par.initial:n = {Nf}
}
-\cs_set:Npn \erw_fold_apply_par:n #1
+% \end{macrocode}
+% \section{option}
+% \label{impl:option}
+% \begin{macrocode}
+\cs_new_protected:Nn\erw_option:n
{
- \tl_set:Nn \__erw_fold_apply_par_tl{#1}
+ \keys_set:nn{@@}{#1}
}
-\cs_set:Npn \erw_fold:NV
- #1 % fun
- #2 % var
+% \end{macrocode}
+% \section{\textsf{seq}}
+% \label{impl:seq}
+% \subsection{backend}
+% \begin{macrocode}
+\tl_new:N \g@@_seq_fold_item_tl
+\cs_new_protected:Nn\@@_seq_put_right_clist:Nn
{
- \use:c{tl_set:\__erw_fold_set_par_tl}
- #2
- {\use:c{erw_apply:\__erw_fold_apply_par_tl}{#1}{#2}}
+ \cs_set_protected:Nn \@@_function:n
+ {
+ \seq_put_right:Nn #1{##1}
+ }
+ \keyval_parse:NNn
+ \@@_function:n
+ \erw_keyval_keyonly:nn
+ {#2}
}
-\cs_generate_variant:Nn \erw_fold:NV {cV}
-\tl_new:N \__erw_fold_seq_item_tl
-\cs_set:Npn \erw_fold_seq:NV
- #1 % fun
- #2 % seq
+\cs_generate_variant:Nn \@@_seq_put_right_clist:Nn { c }
+\cs_new_protected:Nn\@@_seq_put_right_prop:NNn
{
- \seq_get_right:NN #2 \__erw_fold_seq_item_tl
- \erw_fold:NV #1 \__erw_fold_seq_item_tl
- \seq_put_right:No #2 {\__erw_fold_seq_item_tl}
+ \@@_seq_put_right_clist:Nn #1
+ {\erw_prop_to_clist:Nn #2 {#3}}
}
-\cs_generate_variant:Nn \erw_fold_seq:NV {cV}
-\cs_set:Npn \erw_identity:n #1{#1}
-\prg_set_conditional:Npnn \erw_is_matrix:n #1 { p, TF }
+\cs_generate_variant:Nn \@@_seq_put_right_prop:NNn { cc }
+% \end{macrocode}
+% \subsection{frontend}
+% ^^A TODO see if can replace compose with just oper
+% \begin{macrocode}
+\cs_new_protected:Nn\erw_seq_put_right_clist:Nn
{
- \erw_gset_map_inline:n{==\tl_count:n{##1}}
- \int_compare:nTF
- {
- \exp_args:Nf\tl_count:n{\tl_head:n{#1}}
- \exp_args:Nf \erw_map:n
- {
- \tl_tail:n{#1}
- }
- }
- {\prg_return_true:}
- {\prg_return_false:}
+ \seq_if_exist:NTF#1
+ {\@@_seq_put_right_clist:Nn#1{#2}}
+ {\seq_new:N#1\erw_seq_put_right_clist:Nn#1{#2}}
}
-% Deprecated in v0.1.4 after realizing \cs{tl_range:n} does the job
-%\cs_set:Npn\__erw_items_to:nnn #1 #2 #3
-%{
-% \int_compare:nNnTF
-% {#1}>{#2}
-% {
-% \exp_args:Nf \tl_head:n{#3}
-% \__erw_items_to:nnn
-% {#1}
-% {\int_eval:n{#2+1}}
-% {\exp_args:Nf \tl_tail:n{#3}}
-% }
-% {
-% \exp_args:Nf \tl_head:n{#3}
-% }
-%}
-%\cs_set:Npn \erw_items_to:nn #1 #2
-%{
-% \__erw_items_to:nnn
-% {#1}
-% {1}
-% {#2}
-%}
-\cs_set:Npn \erw_last_item:n #1
+\cs_generate_variant:Nn \erw_seq_put_right_clist:Nn { c }
+\cs_new_protected:Nn\erw_seq_put_right_prop:NNn
{
- \exp_args:Nof \tl_item:nn
- {#1}
- {
- \tl_count:n{#1}
- }
+ \seq_if_exist:NTF#1
+ {\@@_seq_put_right_prop:NNn#1#2{#3}}
+ {\seq_new:N#1\erw_seq_put_right_prop:NNn#1#2{#3}}
}
-\cs_set:Npn \erw_merge:nn #1 #2
+\cs_generate_variant:Nn \erw_seq_put_right_prop:NNn { cc }
+\cs_new_protected:Nn \erw_seq_fold:NN
{
- {#1#2}
+ \seq_get_right:NN #2 \g@@_seq_fold_item_tl
+ \erw_tl_fold:NN #1 \g@@_seq_fold_item_tl
+ \seq_put_right:No #2 {\g@@_seq_fold_item_tl}
}
-\cs_set:Npn \erw_repeat:nn #1 #2
+\cs_generate_variant:Nn \erw_seq_fold:NN {cN}
+\cs_new:Nn \erw_seq_use:Nn
{
- \int_step_inline:nnnn{1}{1}{#1}{#2}
+ \exp_last_unbraced:NNf
+ \seq_use:Nnnn #1
+ \erw_tl_separators:n{#2}
}
-\cs_set:Npn \erw_split:nnn #1 #2 #3
+% \end{macrocode}
+% \section{\textsf{sys}}
+% \label{impl:sys}
+% \subsection{backend}
+% \begin{macrocode}
+% \end{macrocode}
+% \begin{macro}{\@@_sys_date:N, \@@_sys_date_dec:, \@@_sys_date_hex:}
+% \begin{macrocode}
+\cs_new:Nn \@@_sys_date_dec:
{
- \tl_head:n{#1}
- \use:c{exp_args:#3} \tl_map_inline:nn
- {
- \tl_tail:n
- {
- #1
- }
- }{#2##1}
+ \int_eval:n
+ {
+ \c_sys_year_int * 10000
+ +\c_sys_month_int * 100
+ +\c_sys_day_int * 1
+ }
}
-\cs_set:Npn \erw_split:nn #1 #2
+\cs_new:Nn \@@_sys_date:N{\int_to_hex:n{\@@_sys_date_dec:}}
+\cs_new:Nn \@@_sys_date_hex:{\int_to_hex:n{\@@_sys_date_dec:}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@_sys_time_dec:, \@@_sys_time_hex}
+% \begin{macrocode}
+\cs_new:Nn \@@_sys_time_dec:
{
- \erw_split:nnn{#1}{#2}{Nf}
+ \int_eval:n
+ {
+ \c_sys_hour_int * 100
+ +\c_sys_minute_int * 1
+ }
}
+\cs_new:Nn\@@_sys_time_hex:{\int_to_hex:n{\@@_sys_time_dec:}}
% \end{macrocode}
-% \section{\textsf{map}}
-% \subsection{\textsf{backend}}
+% \end{macro}
+% \begin{macro}{\@@_sys_datetime_base:n, \@@_sys_datetime_dec:n, \@@_sys_datetime_join:nn, \@@_sys_datetime_hex:n, \@@_sys_datetime_period:n }
% \begin{macrocode}
-\cs_set:Npn \__erw_int_range:nnn #1 #2 #3
+\cs_new:Nn\@@_sys_datetime_base:n
{
- \int_compare:nNnTF
- {
- \int_eval:n{#2+1}
- }>{#3}
- {
- {#1}
- }
- {
- \__erw_int_range:nnn
- {
- \exp_args:Nx\erw_accum:nn{#1}
- {
- \int_eval:n{#2+1}
- }
- }
- {\int_eval:n{#2+1}}
- {#3}
- }
+ \int_case:nnTF{#1}
+ {
+ {10}{dec}
+ {16}{hex}
+ }
+ {\c_empty_tl}
+ {\msg_error:nnn{@@}{timestamp / base}{\@@_sys_datetime_base:n{#1}}}
}
-\cs_set:Npn \erw_int_range:nn #1 #2
+\cs_new:Nn\@@_sys_datetime_join:nn{\erw_tl_join:nnn{#1}{\g@@_sys_timestamp_delim_str}{#2}}
+\cs_new:Nn\@@_sys_datetime_period:n
{
- \__erw_int_range:nnn {{#1}}{#1}{#2}
+ \str_case:nnTF{#1}
+ {
+ {date}{date}
+ {time}{time}
+ {datetime}{datetime}
+ }
+ {\c_empty_tl}
+ {\msg_error:nnn{@@}{ timestamp / period }{\@@_sys_datetime_period:n{#1}}}
}
-\cs_set:Npn \erw_int_range:n #1
+\cs_new:Nn\@@_sys_datetime_dec: {\@@_sys_datetime_join:nn{\@@_sys_date_dec:}{\@@_sys_time_dec:}}
+\cs_new:Nn\@@_sys_datetime_hex: {\@@_sys_datetime_join:nn{\@@_sys_date_hex:}{\@@_sys_time_hex:}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@_sys_jobnametimestamp_prefix:}
+% \begin{macrocode}
+\cs_new:Nn\@@_sys_jobnametimestamp_prefix:
{
- \__erw_int_range:nnn {}{0}{#1}
-% Alt to:
-% \int_step_inline:nn {#1}{##1}
+ \erw_tl_join:nn
+ {\c_sys_jobname_str}
+ {\g@@_sys_timestamp_delim_str}
}
% \end{macrocode}
-% \section{\textsf{map}}
-% \subsection{\textsf{backend}}
+% \end{macro}
+% \begin{macro}{\@@_sys_jobnametimestamp:n, \@@_sys_jobnametimestamp:}
% \begin{macrocode}
-\cs_set:Npn \erw_gset_map:N #1
+\cs_new:Nn\@@_sys_jobnametimestamp:nn
{
- \erw_cs_gset_eq:NN \__erw_map:n #1
+ \erw_tl_join:nn
+ {\@@_sys_jobnametimestamp_prefix:}
+ {\erw_sys_timestamp:nn{#1}{#2}}
}
-\cs_set:Npn \erw_gset_map_inline:n #1
+\cs_new:Nn\@@_sys_jobnametimestamp:
{
- \erw_cs_gset_inline:Nn \__erw_map:n {#1}
+ \erw_tl_join:nn
+ {\@@_sys_jobnametimestamp_prefix:}
+ {\erw_sys_timestamp:}
}
-\cs_set:Npn \erw_map:n #1
-{
- \__erw_map:nn#1\q_recursion_tail\q_recursion_stop\q_recursion_tail\q_recursion_stop
-}
-\cs_set:Npn \__erw_map:nn #1 #2
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@_sys_timestamp:nn}
+% \begin{macrocode}
+\cs_new:Nn\@@_sys_timestamp:nn
{
- \quark_if_recursion_tail_stop:n{#1}
- \__erw_map:n{#1} \__erw_map:nn{#2}
+ \exp_args:No
+ \use:c{@@_sys_\@@_sys_datetime_period:n{#1}_\@@_sys_datetime_base:n{#2}:}
}
-\cs_new:Npn \__erw_map:n #1
+\cs_new_protected:Nn \@@_sys_set_delim:nn
{
- \msg_error:nnn
- {erw}
- {generic}
- {__erw_map:n~not~set}
+ \use:c{tl_gset:N#1}
+ \g@@_sys_timestamp_delim_str{#2}
}
-\cs_set:Npn \erw_map:Nn
- #1 % fun
- #2 % tl
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\keys_define:nn{@@}
+{
+ sys / timestamp_delim .code:n =
+ {
+ \exp_last_unbraced:No
+ \@@_sys_set_delim:nn{n}{#1}
+ },
+ sys / timestamp_delim .value_required:n = true,
+ sys / timestamp_delim .default:n = {-},
+ sys / timestamp_delim .initial:n = {-}
+}
+% \subsection{frontend}
+% \begin{macrocode}
+\cs_new:Nn\erw_sys_jobnametimestamp:nn{\@@_sys_jobnametimestamp:nn{#1}{#2}}
+\cs_new:Nn\erw_sys_jobnametimestamp:{\@@_sys_jobnametimestamp:}
+\cs_new:Nn\erw_sys_timestamp_delimiter:
{
- \erw_cs_set_eq:NN \__erw_map:n #1
- \erw_map:n{#2}
+ \use:N \g@@_sys_timestamp_delim_str
}
-\cs_set:Npn \erw_map_inline:nn
- #1 % inl
- #2 % tl
+\cs_new:Nn\erw_sys_timestamp:nn
{
- \erw_cs_set_inline:Nn \__erw_map:n {#1}
- \erw_map:n{#2}
+ \@@_sys_timestamp:nn{#1}{#2}
}
-\cs_set:Npn \erw_apply:Nnn #1 #2 #3
+\cs_new:Nn\erw_sys_timestamp:
{
- #1{#2}{#3}
+ \@@_sys_timestamp:nn{datetime}{16}
}
-\cs_set:Npn \erw_apply:Nnnn #1 #2 #3 #4
+% \end{macrocode}
+% \section{\textsf{tl}}
+% \label{impl:tl}
+% \subsection{backend}
+% \begin{macrocode}
+\tl_new:N \g@@_tl_compose_tl
+% \end{macrocode}
+% \begin{macro}{\g@@_tl_function:n}
+% \begin{macrocode}
+\cs_new_protected:Nn \g@@_tl_function:n
{
- #1{#2}{#3}{#4}
+ \msg_error:nnn
+ {erw}
+ {notset}
+ {\g@@_tl_function:n}
}
-\cs_set:Npn \erw_apply:Nnnnn #1 #2 #3 #4 #5
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@_tl_map:nn}
+% \begin{macrocode}
+\cs_set_protected:Nn \@@_tl_map:nn
{
- #1{#2}{#3}{#4}{#5}
+ \quark_if_recursion_tail_stop:n{#1}
+ \g@@_tl_function:n{#1} \@@_tl_map:nn{#2}
}
-\cs_set:Npn \__erw_map_thread_at:Nnn #1 #2 #3
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@_tl_map_thread_at:Nnn, \@@_tl_map_thread_at:Nnnn, \@@_tl_map_thread_at:Nnnnn, \@@_tl_map_thread_at:Nnnnnn}
+% \begin{macrocode}
+\cs_set_protected:Nn \@@_tl_map_thread_at:Nnn
{
- \erw_apply:Nn #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
+ #1
+ {\exp_args:Nf\tl_item:nn {#3} {#2} }
}
-\cs_set:Npn \__erw_map_thread_at:Nnnn #1 #2 #3 #4
+\cs_set_protected:Nn \@@_tl_map_thread_at:Nnnn
{
- \erw_apply:Nnn #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
- {\exp_args:Nf\tl_item:nn {#4} {#2} }
+ #1
+ {\exp_args:Nf\tl_item:nn {#3} {#2} }
+ {\exp_args:Nf\tl_item:nn {#4} {#2} }
}
-\cs_set:Npn \__erw_map_thread_at:Nnnnn #1 #2 #3 #4 #5
+\cs_set_protected:Nn \@@_tl_map_thread_at:Nnnnn
{
- \erw_apply:Nnnn #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
- {\exp_args:Nf\tl_item:nn {#4} {#2} }
- {\exp_args:Nf\tl_item:nn {#5} {#2} }
+ #1
+ {\exp_args:Nf\tl_item:nn {#3} {#2} }
+ {\exp_args:Nf\tl_item:nn {#4} {#2} }
+ {\exp_args:Nf\tl_item:nn {#5} {#2} }
}
-\cs_set:Npn \__erw_map_thread_at:Nnnnnn #1 #2 #3 #4 #5 #6
+\cs_set_protected:Nn \@@_tl_map_thread_at:Nnnnnn
{
- \erw_apply:Nnnnn #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
- {\exp_args:Nf\tl_item:nn {#4} {#2} }
- {\exp_args:Nf\tl_item:nn {#5} {#2} }
- {\exp_args:Nf\tl_item:nn {#6} {#2} }
+ #1
+ {\exp_args:Nf\tl_item:nn {#3} {#2} }
+ {\exp_args:Nf\tl_item:nn {#4} {#2} }
+ {\exp_args:Nf\tl_item:nn {#5} {#2} }
+ {\exp_args:Nf\tl_item:nn {#6} {#2} }
}
-\cs_set:Npn \erw_map_thread_at:Nnn #1 #2 #3
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@_tl_separators:nn}
+% \begin{arguments}
+% \item \meta{ int }
+% \item \meta{ items }
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Nn \@@_tl_separators:nn
{
- \exp_args:Nf\int_case:nnTF
- {
- \tl_count:n{#3}
- }
- {
- {1}{ \__erw_map_thread_at:Nnn #1{#2}#3 }
- {2}{ \__erw_map_thread_at:Nnnn #1{#2}#3 }
- {3}{ \__erw_map_thread_at:Nnnnn #1{#2}#3 }
- {4}{ \__erw_map_thread_at:Nnnnnn #1{#2}#3 }
- }
- {
- % Do nothing
- }
+ \int_case:nnTF {#1}
+ {
+ {1}
+ { \prg_replicate:nn{ 3 }{#2} }
+ {2}
{
- \msg_error:nnn{erw}
- {generic}
- {erw_map_thread_at:~count~of~#3~not~withing~1~to~4}
+ { \use_ii:nn #2 }
+ { \use_i:nn #2 }
+ { \use_i:nn #2 \use_ii:nn #2 }
}
+ {3}{#2}
+ }
+ { \c_empty_tl }
+ {
+ \msg_error:nnnn { @@ }
+ { separ }
+ { \@@_tl_separators:nn }
+ {#2}
+ }
}
-\cs_set:Npn \erw_map_thread:Nn #1 #2
+\cs_generate_variant:Nn \@@_tl_separators:nn { e }
+% \end{macrocode}
+% \end{macro}
+% \subsection{frontend}
+% ^^A TODO see if can replace compose with just oper
+% \begin{macrocode}
+\cs_new:Nn \erw_tl_append_item:nn
{
- % TODO check that #2 is a matrix
- \int_step_inline:nn
- {
- \exp_args:Nf \tl_count:n{ \tl_head:n{#2} }
- }
- {
- \erw_map_thread_at:Nnn #1 {##1} {#2}
- }
+ {#1{#2}}
}
+\cs_new:Nn \erw_tl_fold:NN
+{
+ \use:c{tl_set:\g@@_tl_fold_set_par_tl}
+ #2
+ {
+ \use:c{exp_args:\g@@_tl_fold_apply_par_tl}{#1}{#2}
+ }
+}
+\cs_generate_variant:Nn \erw_tl_fold:NN {cN}
+\cs_new:Nn \erw_tl_gset_function:N
+{
+ \erw_cs_gset_eq:NN \g@@_tl_function:n #1
+}
+\cs_new:Nn \erw_tl_gset_function:n
+{
+ \erw_cs_gset_inline:Nn \g@@_tl_function:n {#1}
+}
+\cs_new:Nn \erw_tl_last_item:n
+{
+ \exp_args:Nof \tl_item:nn
+ {#1}
+ {
+ \tl_count:n{#1}
+ }
+}
+% \end{macrocode}
+% \begin{macro}{\erw_tl_join:nn, \erw_tl_join:nnn, \erw_tl_join:nnnn, \erw_tl_join:nnnnn}
+% \begin{macrocode}
+\cs_new:Nn \erw_tl_join:nn{#1#2}
+\cs_new:Nn \erw_tl_join:nnn{#1#2#3}
+\cs_new:Nn \erw_tl_join:nnnn{#1#2#3#4}
+\cs_new:Nn \erw_tl_join:nnnnn{#1#2#3#4#5}
% \end{macrocode}
-% \section{\textsf{numbrdcs}}
-% \subsection{\textsf{backend}}
+% \end{macro}
% \begin{macrocode}
-\int_new:N \__erw_numbrd_cs_int
-\cs_set:Npn \erw_numbrd_cs_name:n #1{__erw_numbrd_cs_\int_to_alph:n{#1}:n}
-\cs_set:Npn \erw_numbrd_cs_name_braced:n #1{{\erw_numbrd_cs_name:n{#1}}}
-\tl_set:Nn \__erw_numbrd_cs_name_tl {\erw_numbrd_cs_name:n{\__erw_numbrd_cs_int}}
-\cs_set:Npn \erw_numbrd_cs:nn #1 #2
+\cs_new_protected:Nn \erw_tl_map:n
+{
+ \@@_tl_map:nn#1\q_recursion_tail\q_recursion_stop\q_recursion_tail\q_recursion_stop
+}
+\cs_new_protected:Nn \erw_tl_map:Nn
{
- \erw_apply:cn{__erw_numbrd_cs_\int_to_alph:n{#1}:n}{#2}
+ \cs_set_eq:NN \g@@_tl_function:n #1
+ \erw_tl_map:n{#2}
}
-\cs_new_protected:Npn \erw_numbrd_cs_reset:
+\cs_new_protected:Nn \erw_tl_map_inline:nn
{
- \int_zero:N \__erw_numbrd_cs_int
- \tl_set:Nn \__erw_numbrd_cs_ext_tl{}
+ \erw_cs_set_inline:Nn \g@@_tl_function:n {#1}
+ \erw_tl_map:n{#2}
}
-\cs_new_protected:Npn \erw_numbrd_cs_new:n #1
-{
- \int_incr:N \__erw_numbrd_cs_int
- \erw_cs_set_inline:cn{\__erw_numbrd_cs_name_tl}
- {
- \token_if_cs:NTF
- {#1}
- {#1{##1}}
- {#1}
- }
+\cs_new:Nn \erw_tl_repeat:nn
+{
+ \int_step_inline:nnnn{1}{1}{#1}{#2}
}
-\cs_new:Npn \erw_numbrd_cs_names:nnn #1 #2 #3
+\cs_new:Nn \erw_tl_split:nnn
{
- \int_step_function:nnnN { #1 }{ #2 }{ #3 } \erw_numbrd_cs_name:n
+ \tl_head:n{#1}
+ \use:c{exp_args:#3} \tl_map_inline:nn
+ {
+ \tl_tail:n
+ {
+ #1
+ }
+ }{#2##1}
}
-\cs_new:Npn \erw_numbrd_cs_names_braced:nnn #1 #2 #3
+\cs_new:Nn \erw_tl_split:nn
{
- \int_step_function:nnnN { #1 }{ #2 }{ #3 } \erw_numbrd_cs_name_braced:n
- % TODO \tl_range_braced:nnn?
+ \erw_tl_split:nnn{#1}{#2}{Nf}
}
-\cs_new:Npn \erw_numbrd_cs_names_braced:
+\cs_new_protected:Nn \erw_tl_map_thread_at:Nnn
{
- \erw_numbrd_cs_names_braced:nnn{1}{1}{\__erw_numbrd_cs_int}
+ \exp_args:Nf\int_case:nnTF
+ {
+ \tl_count:n{#3}
+ }
+ {
+ {1}{ \@@_tl_map_thread_at:Nnn #1{#2}#3 }
+ {2}{ \@@_tl_map_thread_at:Nnnn #1{#2}#3 }
+ {3}{ \@@_tl_map_thread_at:Nnnnn #1{#2}#3 }
+ {4}{ \@@_tl_map_thread_at:Nnnnnn #1{#2}#3 }
+ }
+ {
+ % Do nothing
+ }
+ {
+ \msg_error:nnn{@@}
+ {generic}
+ {erw_tl_map_thread_at:~count~of~#3~not~withing~1~to~4}
+ }
}
-% \end{macrocode}
-% \subsection{\textsf{frontend}}
-% \begin{macrocode}
-\NewDocumentCommand{\numbrdcsnew}{ s m }
+\cs_new_protected:Nn \erw_tl_map_thread:Nn
{
- \IfBooleanTF{#1}
- {}
- { \erw_numbrd_cs_reset:{}}
- \tl_map_function:nN {#2}\erw_numbrd_cs_new:n
+ \int_step_inline:nn
+ {
+ \exp_args:Nf \tl_count:n{ \tl_head:n{#2} }
+ }
+ {
+ \erw_tl_map_thread_at:Nnn #1 {##1} {#2}
+ }
}
-\NewDocumentCommand{\numbrdcs}{ m m }
+\cs_new:Nn \erw_tl_separators:n
{
- \erw_numbrd_cs:nn{#1}{#2}
+ \@@_tl_separators:en{ \tl_count:n{#1} }{#1}
}
-% \ProcessKeysPackageOptions{ erw }
+% \end{macrocode}
+% \section{Closing}
+% \label{impl:closing}
+%
+% \begin{macrocode}
\ExplSyntaxOff
+%</package>
% \end{macrocode}
-% \part{Other}\label{part:other}
-%
-% \section{Support}\label{support}
-%
-% This package is available from \url{https://www.ctan.org/pkg/erw-l3} (release) or \url{https://github.com/rogard/erw-l3} (development) where you can report issues.
-%
-% \section{To do}\label{todo}
-%
-% \begin{itemize}
-% \item Missing variants of \cs{erw_compose}
-% \item \cs{erw_map_indexed}. See Listing~\autoref{listng:mapindexed}
-% \item Need to give some thought to `protected'
-% \end{itemize}
-%
-% \section{Acknowledgment}
-% I thank those that have answered my questions on forums pertaining to \LaTeX3. See here: \url{https://tex.stackexchange.com/users/112708/erwann?tab=questions}
-% and here: \url{https://latex.org/forum/memberlist.php?mode=viewprofile&u=61329}
-%
-% ^^A \section{Change history}
-% ^^A TODO Bring the change history under this section
-% ^^A The versions showns are of those of the development stage, some may have been skipped in the release.
-% ^^A \iffalse
-% ^^A : changes
-% ^^A \fi
-%
-% \changes{0.1}{2018/05/20}{Initial version}
-% \changes{0.1.1}{2018/05/23}{}
-% \changes{0.1.1}{2018/05/23}{Brought all the modules under one file; renamed \pkg{l3erw} to \pkg{erw-l3};}
-% \changes{0.1.1}{2018/05/23}{\pkg{disambig}/backend: changes to the key, added \cs{ProcessPackageKeysOption};}
-% \changes{0.1.1}{2018/05/23}{\cs{numbrdcsnew} changed to \cs{newnumbrdcs} and made 'disambiguable'}
-% \changes{0.1.2}{2018/06/21}{}
-% \changes{0.1.2}{2018/06/21}{\cs{erw_compose} reversed order in which the functions are composed, such that it now conforms to
-% the mathematical convention ($g\circ f$ means $f$ comes before $g$)}
-%\changes{0.1.2}{2018/06/21}{Front end cmds no longer generated with module \pkg{disambig}; Option of the same name deleted;}
-%\changes{0.1.2}{2018/06/21}{\pkg{disambig}: pushed the code inside \cs{keys_define};\cs{disambignewcmd} no longer takes a token name as arg, rather a token.}
-%\changes{0.1.2}{2018/06/21}{Added \cs{erw_repeat}}
-%\changes{0.1.2}{2018/06/21}{Added \cs{erw_split}}
-%\changes{0.1.2}{2018/06/21}{Added \cs{erw_last_item}}
-%\changes{0.1.2}{2018/06/21}{Added \cs{erw_items_to}}
-%\changes{0.1.2}{2018/06/21}{Added \cs{map_thread}}
-%\changes{0.1.2}{2018/06/21}{Re-arranged the doc to clearly separate frontend from backend}
-%\changes{0.1.3}{2018/06/22}{Wrong versioning, should have been 0.1.2}
-%\changes{0.1.4}{2018/06/22}{}
-%\changes{0.1.4}{2018/06/22}{Removed \cs{erw_items_to} (redundant with \cs{tl_range:nnn})}
-%\changes{0.1.4}{2018/06/22}{Added \cs{erw_accum}}
-%\changes{0.1.4}{2018/06/22}{Added \cs{erw_merge}}
-%\changes{0.1.4}{2018/06/22}{Added \cs{erw_int_range}}
-%\changes{0.1.4}{2018/06/22}{Added \cs{erw_set_map}}
-%\changes{0.1.4}{2018/06/22}{Added \cs{erw_set_map_inline}}
-%\changes{0.1.4}{2018/06/22}{Added \cs{erw_is_matrix}}
-%\changes{0.1.5}{2019/12/12}{Modified source repository}
-%\changes{0.1.5}{2019/12/12}{Rearranged frontend/backend sections}
-%\changes{0.1.5}{2019/12/12}{Split Section Preliminaries into Conventions and Requirement.}
-%\changes{0.1.5}{2019/12/12}{Removed \pkg{disambig}}
-%\changes{0.1.6}{2020/02/05}{Fixed critical bug preventing \pkg{erw-l3} from working without explicit inclusion of \pkg{expl3}}
%
-% % \begin{thebibliography}{1}
-%
-% ^^A\bibitem{expl3} The \LaTeX3 Project Team {\em The \pkg{expl3} package and \LaTeX3 programming}
-% ^^A\url{http://ftp.math.purdue.edu/mirrors/ctan.org/macros/latex/contrib/l3kernel/expl3.pdf}
-%
-% \bibitem{interface3} The \LaTeX3 Project Team {\em The \LaTeX3 interfaces}
-% \url{http://ftp.math.purdue.edu/mirrors/ctan.org/macros/latex/contrib/l3kernel/interface3.pdf}
-%
-% \bibitem{xparse} The \LaTeX3 Project Team {\em The \pkg{xparse} package}
-% \url{http://ftp.math.purdue.edu/mirrors/ctan.org/macros/latex/contrib/l3packages/xparse.pdf}
-%
-% ^^A \bibitem{l3pckg} The \LaTeX3 Project Team {\em l3packages} \url{http://mirror.ctan.org/macros/latex/contrib/l3packages/}
-%
-% ^^A \bibitem{tex.stack:431046} \url{https://tex.stackexchange.com/questions/431046/calling-expl3s-usec-on-an-expression-expanding-to-a-cs-name-causes-error}
-%
-% ^^A \bibitem{tex.stack:432171} \url{https://tex.stackexchange.com/questions/432171/expl3-making-arguments-from-a-loop}
-%
-% \end{thebibliography}
-%
-%
-% \iffalse
-%</package>
-% \fi
+% \end{implementation}
+% ^^A% \iffalse
+% ^^A%</package>
+% ^^A% \fi
% \Finale
\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/erw-l3/erw-l3.ins b/Master/texmf-dist/source/latex/erw-l3/erw-l3.ins
deleted file mode 100644
index 9ce820375b6..00000000000
--- a/Master/texmf-dist/source/latex/erw-l3/erw-l3.ins
+++ /dev/null
@@ -1,68 +0,0 @@
-%%
-%% This is file `erw-l3.ins',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% erw-l3.dtx (with options: `install')
-%% ----------------------------------------------------------------
-%% erw-l3 Utilities built around expl3
-%% Released under the LaTeX Project Public License v1.3c or later
-%% See http://www.latex-project.org/lppl.txt
-%% ----------------------------------------------------------------
-%%
-\input docstrip.tex
-\keepsilent
-\askforoverwritefalse
-\preamble
-----------------------------------------------------------------
-erw-l3 Utilities built around expl3
-Released under the LaTeX Project Public License v1.3c or later
-See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
-
-\endpreamble
-\postamble
-
-Copyright (C) 2018 by Erwann Rogard
-
-This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License (LPPL), either
-version 1.3c of this license or (at your option) any later
-version. The latest version of this license is in the file:
-
-http://www.latex-project.org/lppl.txt
-
-This work is "maintained" (as per LPPL maintenance status) by
-Erwann Rogard.
-
-This work consists of the file erw-l3.dtx
-and the derived files erw-l3.ins,
- erw-l3.pdf and
- erw-l3.sty.
-
-\endpostamble
-\generate{
- \file{\jobname.sty}{\from{\jobname.dtx}{package}}
-}
-\endbatchfile
-%%
-%% Copyright (C) 2018 by Erwann Rogard
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License (LPPL), either
-%% version 1.3c of this license or (at your option) any later
-%% version. The latest version of this license is in the file:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" (as per LPPL maintenance status) by
-%% Erwann Rogard.
-%%
-%% This work consists of the file erw-l3.dtx
-%% and the derived files erw-l3.ins,
-%% erw-l3.pdf and
-%% erw-l3.sty.
-%%
-%%
-%% End of file `erw-l3.ins'.
diff --git a/Master/texmf-dist/tex/latex/erw-l3/erw-l3.sty b/Master/texmf-dist/tex/latex/erw-l3/erw-l3.sty
index ba4182d0e1d..18e94e85057 100644
--- a/Master/texmf-dist/tex/latex/erw-l3/erw-l3.sty
+++ b/Master/texmf-dist/tex/latex/erw-l3/erw-l3.sty
@@ -5,385 +5,499 @@
%% The original source files were:
%%
%% erw-l3.dtx (with options: `package')
-%% ----------------------------------------------------------------
-%% erw-l3 Utilities built around expl3
+%% ----------------------------------------------------------------------------
+%% erw-l3 --- Utilities for LaTeX3 programming
%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
-%% ----------------------------------------------------------------
+%% ----------------------------------------------------------------------------
%%
-\RequirePackage{expl3}[2018/06/01]
-\RequirePackage{xparse}[2018/02/01]
-\RequirePackage{l3keys2e}
-\ProvidesExplPackage
- {erw-l3} % Package name
- {2020/02/05} % Release date
- {0.1.6} % Release version
- {Utilities built around expl3} % Description
-\NeedsTeXFormat{LaTeX2e}
-\ExplSyntaxOn
-\msg_new:nnn{erw}{generic}{#1}
-\cs_set:Npn \erw_compose:NnV
- #1 % method
- #2 % funs
- #3 % var
-{
- \erw_fold_set_par:n{Nf}
- \erw_fold_apply_par:n{Nf}
- \erw_cs_set_inline:Nn \__erw_map:n
+ \NeedsTeXFormat{LaTeX2e}[2020/02/02]
+ \RequirePackage{etoolbox}[2019/09/21]
+ \RequirePackage{l3keys2e}[2020/03/06]
+ \RequirePackage{xparse}[2020/03/06]
+ \ProvidesExplPackage
+ {erw-l3} % Package name
+ {2020/06/04} % Release date
+ {3.1} % Release version
+ {erw-l3 --- Utilities for LaTeX3 programming } % Description
+\cs_new:Nn \__erw_cs_name:N
+{
+ \exp_last_unbraced:Nf \use_i:nnn {\cs_split_function:N #1}
+}
+\cs_new:Nn \erw_cs_compose:NnN
+{
+ \erw_cs_set_inline:Nn \g__erw_tl_function:n
{
- #1{##1}#3
+ #1{##1}#3
}
- \exp_args:Nf\erw_map:n
+ \exp_args:Nf\erw_tl_map:n
{
- \tl_reverse:n{#2}
+ \tl_reverse:n{#2}
}
}
-\cs_set:Npn \erw_compose:nV #1 #2
+\cs_set:Npn \erw_cs_identity:n #1{#1}
+\cs_new_protected:Nn \erw_cs_set_inline:Nn
{
- \erw_compose:NnV \erw_fold:NV {#1} #2
+ \cs_set:Npn #1 ##1{#2}
}
-\cs_set:Npn \erw_compose_c:nV #1 #2
+\cs_generate_variant:Nn \erw_cs_set_inline:Nn {cn}
+\cs_new:Nn \erw_cs_gset_inline:Nn
{
- \erw_compose:NnV \erw_fold:cV {#1} #2
+ \cs_gset:Npn #1 ##1{#2}
}
-\tl_new:N \__erw_compose_tl
-\cs_set:Npn \erw_compose:nn #1 #2
+\cs_generate_variant:Nn \erw_cs_gset_inline:Nn {cn}
+\int_new:N \g__erw_csint_int
+\cs_new:Nn \__erw_csint_name: {\erw_csint_name:n{\g__erw_csint_int}}
+\cs_new:Nn \erw_csint:nn
{
- \tl_set:Nn \__erw_compose_tl {#2}
- \erw_compose:nV{#1}\__erw_compose_tl
- \__erw_compose_tl
+ \exp_args:No \use:c{\erw_csint_name:n{#1}}{#2}
}
-\cs_set:Npn \erw_compose_c:nn #1 #2
+\cs_new:Nn \erw_csint_name:n {__erw_csint_\int_to_alph:n{#1}:n}
+\cs_new_protected:Nn \erw_csint_new:n
{
- \tl_set:Nn \__erw_compose_tl {#2}
- \erw_compose_c:nV{#1}\__erw_compose_tl
- \__erw_compose_tl
+ \int_incr:N \g__erw_csint_int
+ \exp_args:No
+ \erw_cs_set_inline:cn{\__erw_csint_name:}
+ {
+ \token_if_cs:NTF
+ {#1}
+ {#1{##1}}
+ {#1}
+ }
}
-\cs_set:Npn \erw_compose_seq:nV #1 #2
+\cs_new:Nn \erw_csint_names_braced:nnn
{
- \erw_compose:NnV \erw_fold_seq:NV {#1} #2
+ \int_step_function:nnnN { #1 }{ #2 }{ #3 } \erw_csint_names_braced:n
+ % TODO \tl_range_braced:nnn?
}
-\cs_set:Npn \erw_compose_seq_c:nV
- #1 % funs
- #2 % seq
+\cs_new:Nn \erw_csint_names_braced:n {{\erw_csint_name:n{#1}}}
+\cs_new:Nn \erw_csint_names_braced:
{
- \erw_compose:NnV \erw_fold_seq:cV {#1} #2
+ \erw_csint_names_braced:nnn{1}{1}{\g__erw_csint_int}
}
-\cs_set:Npn \erw_compose_vers:nV #1 #2
+\cs_new_protected:Nn \erw_csint_reset:
{
- \msg_error:nnn{erw}{generic}{erw_compose_vers:nV~yet-to~be~implemented}
+ \int_zero:N \g__erw_csint_int
+ \tl_set:Nn \__erw_csint_ext_tl{}%^^A TODO remove?
}
-\cs_set:Npn \erw_compose_seq_vers:nV #1 #2
+\cs_set:Npn \__erw_int_range:nnn #1 #2 #3
{
- \msg_error:nnn{erw}{generic}{erw_compose_vers:nV~yet-to~be~implemented}
+ \int_compare:nNnTF
+ {
+ \int_eval:n{#2+1}
+ }>{#3}
+ {
+ {#1}
+ }
+ {
+ \__erw_int_range:nnn
+ {
+ \exp_args:Nx\erw_tl_append_item:nn{#1}
+ {
+ \int_eval:n{#2+1}
+ }
+ }
+ {\int_eval:n{#2+1}}
+ {#3}
+ }
}
-\cs_set:Npn \erw_compose_vers:nn #1 #2
+\cs_new:Nn \erw_int_range:nn
{
- \erw_numbrd_cs_reset:{}
- \tl_map_function:nN{#1}\erw_numbrd_cs_new:n
- \exp_last_unbraced:Nx
- \erw_compose_c:nn
- {{\erw_numbrd_cs_names_braced:{}}}
- {#2}
+ \__erw_int_range:nnn {{#1}}{#1}{#2}
}
-\cs_set:Npn \erw_accum:nn #1 #2
+\cs_new:Nn \erw_int_range:n
{
- {#1{#2}}
+ \__erw_int_range:nnn {}{0}{#1}
}
-\cs_set:Npn \__erw_cs_name:N #1
+\cs_new:Nn \erw_keyval_error:Nn{\msg_error:nnnnn{__erw}{keyval/n}{\erw_keyval_error:Nn}{#1}{#2}}
+\cs_new:Nn \erw_keyval_error:Nnn{\msg_error:nnnnnn{__erw}{keyval/nn}{\erw_keyval_error:Nnn}{#1}{#2}{#3}}
+\cs_new_protected:Nn\erw_keyval_parse:NNNn
{
- \exp_last_unbraced:Nf \use_i:nnn {\cs_split_function:N #1}
+ \cs_set_protected:Nn \__erw_keyval_function:n {#2 #1{##1}}
+ \cs_set_protected:Nn \__erw_keyval_function:nn {#3 #1{##1}{##2}}
+ \keyval_parse:NNn
+ \__erw_keyval_function:n
+ \__erw_keyval_function:nn
+ {#4}
}
-\cs_set:Npn \erw_apply:Nn
- #1 % fun
- #2 % tl
+\cs_new_protected:Npn \erw_lambda:nnn #1 #2 #3
{
- #1{#2}
+ \exp_args:NNx
+ #1 \__erw_lambda_expression
+ {#2}
+ {#3}
+ \__erw_lambda_expression
}
-\cs_generate_variant:Nn \erw_apply:Nn {No, Nf, Nx, c}
-\cs_set:Npn \erw_cs_set_eq:NN #1 #2
+\msg_new:nnn{__erw}{generic}{#1}
+\msg_new:nnn{__erw}{keyval/nn}{#1#2{#3}{#4};~encountered~key=val~where~only~key~required}
+\msg_new:nnn{__erw}{keyval/n}{#1#2{#3};~encountered~key~~where~only~key=val~required}
+\msg_new:nnn{__erw}{separ}{#1~expects~1~to~3~items,~#2}
+\msg_new:nnn{__erw}{timestamp / base}{Calling~#1,~arg~must~be~'dec|hex'}
+\msg_new:nnn{__erw}{timestamp / period}{Calling~#1,~arg~must~be~'date|time|datetime'}
+\msg_new:nnn{erw}{notset}{#1~not~set}
+\cs_new_protected:Nn \__erw_prop_map_item:NNN
{
- \cs_set:Npn #1 ##1{#2{##1}}
+ \cs_set_protected:Nn \__erw_function:nn
+ {
+ #1 #2 {##1}{##2}
+ }
+ \prop_map_function:NN #3 \__erw_function:nn
}
-\cs_generate_variant:Nn \erw_cs_set_eq:NN {cN}
-\cs_set:Npn \erw_cs_gset_eq:NN #1 #2
+\cs_new_protected:Nn \erw_prop_to_clist:Nn
{
- \cs_gset:Npn #1 ##1{#2{##1}}
+ \cs_set:Nn \__erw_keyval_function:n {,\prop_item:Nn#1{##1}}
+ \exp_args:Nf
+ \tl_tail:n
+ {
+ \keyval_parse:NNn
+ \__erw_keyval_function:n
+ \erw_keyval_error:Nnn
+ {#2}
+ }
}
-\cs_generate_variant:Nn \erw_cs_gset_eq:NN {cN}
-\cs_set:Npn \erw_cs_set_inline:Nn #1 #2
+\cs_generate_variant:Nn \erw_prop_to_clist:Nn { c }
+\cs_new_protected:Nn \erw_prop_map_item:NNN
{
- \cs_set:Npn #1 ##1{#2}
+ \prop_if_exist:NTF #2
+ {\__erw_prop_map_item:NNN #1#2#3}
+ {
+ \prop_new:N #2
+ \erw_prop_map_item:NNN #1#2#3
+ }
}
-\cs_generate_variant:Nn \erw_cs_set_inline:Nn {cn}
-\cs_set:Npn \erw_cs_gset_inline:Nn #1 #2
+\cs_new_protected:Nn\erw_prop_keyval_parse:NNNn
{
- \cs_gset:Npn #1 ##1{#2}
+ \prop_if_exist:NTF#1
+ {\erw_keyval_parse:NNNn #1#2#3{#4}}
+ {
+ \prop_new:N #1
+ \erw_prop_keyval_parse:NNNn#1#2#3{#4}
+ }
}
-\cs_generate_variant:Nn \erw_cs_gset_inline:Nn {cn}
-\tl_set:Nn \__erw_fold_set_par_tl{\c_novalue_tl}
-\tl_set:Nn \__erw_fold_apply_par_tl{\c_novalue_tl}
-\cs_set:Npn \erw_fold_set_par:n #1
+\keys_define:nn{__erw}
{
- \tl_set:Nn \__erw_fold_set_par_tl{#1}
+ tl/fold_set_par.tl_gset:N = \g__erw_tl_fold_set_par_tl,
+ tl/fold_set_par.value_required:n = true,
+ tl/fold_set_par.default:n = {Nf},
+ tl/fold_set_par.initial:n = {Nf},
+ tl/fold_apply_par.tl_gset:N = \g__erw_tl_fold_apply_par_tl,
+ tl/fold_apply_par.value_required:n = true,
+ tl/fold_apply_par.default:n = {Nf},
+ tl/fold_apply_par.initial:n = {Nf}
}
-\cs_set:Npn \erw_fold_apply_par:n #1
+\cs_new_protected:Nn\erw_option:n
{
- \tl_set:Nn \__erw_fold_apply_par_tl{#1}
+ \keys_set:nn{__erw}{#1}
}
-\cs_set:Npn \erw_fold:NV
- #1 % fun
- #2 % var
+\tl_new:N \g__erw_seq_fold_item_tl
+\cs_new_protected:Nn\__erw_seq_put_right_clist:Nn
{
- \use:c{tl_set:\__erw_fold_set_par_tl}
- #2
- {\use:c{erw_apply:\__erw_fold_apply_par_tl}{#1}{#2}}
+ \cs_set_protected:Nn \__erw_function:n
+ {
+ \seq_put_right:Nn #1{##1}
+ }
+ \keyval_parse:NNn
+ \__erw_function:n
+ \erw_keyval_keyonly:nn
+ {#2}
}
-\cs_generate_variant:Nn \erw_fold:NV {cV}
-\tl_new:N \__erw_fold_seq_item_tl
-\cs_set:Npn \erw_fold_seq:NV
- #1 % fun
- #2 % seq
+\cs_generate_variant:Nn \__erw_seq_put_right_clist:Nn { c }
+\cs_new_protected:Nn\__erw_seq_put_right_prop:NNn
{
- \seq_get_right:NN #2 \__erw_fold_seq_item_tl
- \erw_fold:NV #1 \__erw_fold_seq_item_tl
- \seq_put_right:No #2 {\__erw_fold_seq_item_tl}
+ \__erw_seq_put_right_clist:Nn #1
+ {\erw_prop_to_clist:Nn #2 {#3}}
}
-\cs_generate_variant:Nn \erw_fold_seq:NV {cV}
-\cs_set:Npn \erw_identity:n #1{#1}
-\prg_set_conditional:Npnn \erw_is_matrix:n #1 { p, TF }
+\cs_generate_variant:Nn \__erw_seq_put_right_prop:NNn { cc }
+\cs_new_protected:Nn\erw_seq_put_right_clist:Nn
{
- \erw_gset_map_inline:n{==\tl_count:n{##1}}
- \int_compare:nTF
- {
- \exp_args:Nf\tl_count:n{\tl_head:n{#1}}
- \exp_args:Nf \erw_map:n
- {
- \tl_tail:n{#1}
- }
- }
- {\prg_return_true:}
- {\prg_return_false:}
+ \seq_if_exist:NTF#1
+ {\__erw_seq_put_right_clist:Nn#1{#2}}
+ {\seq_new:N#1\erw_seq_put_right_clist:Nn#1{#2}}
}
-\cs_set:Npn \erw_last_item:n #1
+\cs_generate_variant:Nn \erw_seq_put_right_clist:Nn { c }
+\cs_new_protected:Nn\erw_seq_put_right_prop:NNn
{
- \exp_args:Nof \tl_item:nn
- {#1}
- {
- \tl_count:n{#1}
- }
+ \seq_if_exist:NTF#1
+ {\__erw_seq_put_right_prop:NNn#1#2{#3}}
+ {\seq_new:N#1\erw_seq_put_right_prop:NNn#1#2{#3}}
}
-\cs_set:Npn \erw_merge:nn #1 #2
+\cs_generate_variant:Nn \erw_seq_put_right_prop:NNn { cc }
+\cs_new_protected:Nn \erw_seq_fold:NN
{
- {#1#2}
+ \seq_get_right:NN #2 \g__erw_seq_fold_item_tl
+ \erw_tl_fold:NN #1 \g__erw_seq_fold_item_tl
+ \seq_put_right:No #2 {\g__erw_seq_fold_item_tl}
}
-\cs_set:Npn \erw_repeat:nn #1 #2
+\cs_generate_variant:Nn \erw_seq_fold:NN {cN}
+\cs_new:Nn \erw_seq_use:Nn
{
- \int_step_inline:nnnn{1}{1}{#1}{#2}
+ \exp_last_unbraced:NNf
+ \seq_use:Nnnn #1
+ \erw_tl_separators:n{#2}
}
-\cs_set:Npn \erw_split:nnn #1 #2 #3
+\cs_new:Nn \__erw_sys_date_dec:
{
- \tl_head:n{#1}
- \use:c{exp_args:#3} \tl_map_inline:nn
- {
- \tl_tail:n
- {
- #1
- }
- }{#2##1}
+ \int_eval:n
+ {
+ \c_sys_year_int * 10000
+ +\c_sys_month_int * 100
+ +\c_sys_day_int * 1
+ }
}
-\cs_set:Npn \erw_split:nn #1 #2
+\cs_new:Nn \__erw_sys_date:N{\int_to_hex:n{\__erw_sys_date_dec:}}
+\cs_new:Nn \__erw_sys_date_hex:{\int_to_hex:n{\__erw_sys_date_dec:}}
+\cs_new:Nn \__erw_sys_time_dec:
{
- \erw_split:nnn{#1}{#2}{Nf}
+ \int_eval:n
+ {
+ \c_sys_hour_int * 100
+ +\c_sys_minute_int * 1
+ }
}
-\cs_set:Npn \__erw_int_range:nnn #1 #2 #3
+\cs_new:Nn\__erw_sys_time_hex:{\int_to_hex:n{\__erw_sys_time_dec:}}
+\cs_new:Nn\__erw_sys_datetime_base:n
{
- \int_compare:nNnTF
- {
- \int_eval:n{#2+1}
- }>{#3}
- {
- {#1}
- }
- {
- \__erw_int_range:nnn
- {
- \exp_args:Nx\erw_accum:nn{#1}
- {
- \int_eval:n{#2+1}
- }
- }
- {\int_eval:n{#2+1}}
- {#3}
- }
+ \int_case:nnTF{#1}
+ {
+ {10}{dec}
+ {16}{hex}
+ }
+ {\c_empty_tl}
+ {\msg_error:nnn{__erw}{timestamp / base}{\__erw_sys_datetime_base:n{#1}}}
}
-\cs_set:Npn \erw_int_range:nn #1 #2
+\cs_new:Nn\__erw_sys_datetime_join:nn{\erw_tl_join:nnn{#1}{\g__erw_sys_timestamp_delim_str}{#2}}
+\cs_new:Nn\__erw_sys_datetime_period:n
{
- \__erw_int_range:nnn {{#1}}{#1}{#2}
+ \str_case:nnTF{#1}
+ {
+ {date}{date}
+ {time}{time}
+ {datetime}{datetime}
+ }
+ {\c_empty_tl}
+ {\msg_error:nnn{__erw}{ timestamp / period }{\__erw_sys_datetime_period:n{#1}}}
}
-\cs_set:Npn \erw_int_range:n #1
+\cs_new:Nn\__erw_sys_datetime_dec: {\__erw_sys_datetime_join:nn{\__erw_sys_date_dec:}{\__erw_sys_time_dec:}}
+\cs_new:Nn\__erw_sys_datetime_hex: {\__erw_sys_datetime_join:nn{\__erw_sys_date_hex:}{\__erw_sys_time_hex:}}
+\cs_new:Nn\__erw_sys_jobnametimestamp_prefix:
{
- \__erw_int_range:nnn {}{0}{#1}
+ \erw_tl_join:nn
+ {\c_sys_jobname_str}
+ {\g__erw_sys_timestamp_delim_str}
}
-\cs_set:Npn \erw_gset_map:N #1
+\cs_new:Nn\__erw_sys_jobnametimestamp:nn
{
- \erw_cs_gset_eq:NN \__erw_map:n #1
+ \erw_tl_join:nn
+ {\__erw_sys_jobnametimestamp_prefix:}
+ {\erw_sys_timestamp:nn{#1}{#2}}
}
-\cs_set:Npn \erw_gset_map_inline:n #1
+\cs_new:Nn\__erw_sys_jobnametimestamp:
{
- \erw_cs_gset_inline:Nn \__erw_map:n {#1}
+ \erw_tl_join:nn
+ {\__erw_sys_jobnametimestamp_prefix:}
+ {\erw_sys_timestamp:}
}
-\cs_set:Npn \erw_map:n #1
+\cs_new:Nn\__erw_sys_timestamp:nn
{
- \__erw_map:nn#1\q_recursion_tail\q_recursion_stop\q_recursion_tail\q_recursion_stop
+ \exp_args:No
+ \use:c{__erw_sys_\__erw_sys_datetime_period:n{#1}_\__erw_sys_datetime_base:n{#2}:}
}
-\cs_set:Npn \__erw_map:nn #1 #2
+\cs_new_protected:Nn \__erw_sys_set_delim:nn
{
- \quark_if_recursion_tail_stop:n{#1}
- \__erw_map:n{#1} \__erw_map:nn{#2}
+ \use:c{tl_gset:N#1}
+ \g__erw_sys_timestamp_delim_str{#2}
}
-\cs_new:Npn \__erw_map:n #1
+\keys_define:nn{__erw}
{
- \msg_error:nnn
- {erw}
- {generic}
- {__erw_map:n~not~set}
+ sys / timestamp_delim .code:n =
+ {
+ \exp_last_unbraced:No
+ \__erw_sys_set_delim:nn{n}{#1}
+ },
+ sys / timestamp_delim .value_required:n = true,
+ sys / timestamp_delim .default:n = {-},
+ sys / timestamp_delim .initial:n = {-}
}
-\cs_set:Npn \erw_map:Nn
- #1 % fun
- #2 % tl
+\cs_new:Nn\erw_sys_jobnametimestamp:nn{\__erw_sys_jobnametimestamp:nn{#1}{#2}}
+\cs_new:Nn\erw_sys_jobnametimestamp:{\__erw_sys_jobnametimestamp:}
+\cs_new:Nn\erw_sys_timestamp_delimiter:
{
- \erw_cs_set_eq:NN \__erw_map:n #1
- \erw_map:n{#2}
+ \use:N \g__erw_sys_timestamp_delim_str
}
-\cs_set:Npn \erw_map_inline:nn
- #1 % inl
- #2 % tl
+\cs_new:Nn\erw_sys_timestamp:nn
{
- \erw_cs_set_inline:Nn \__erw_map:n {#1}
- \erw_map:n{#2}
+ \__erw_sys_timestamp:nn{#1}{#2}
}
-\cs_set:Npn \erw_apply:Nnn #1 #2 #3
+\cs_new:Nn\erw_sys_timestamp:
{
- #1{#2}{#3}
+ \__erw_sys_timestamp:nn{datetime}{16}
}
-\cs_set:Npn \erw_apply:Nnnn #1 #2 #3 #4
+\tl_new:N \g__erw_tl_compose_tl
+\cs_new_protected:Nn \g__erw_tl_function:n
{
- #1{#2}{#3}{#4}
+ \msg_error:nnn
+ {erw}
+ {notset}
+ {\g__erw_tl_function:n}
}
-\cs_set:Npn \erw_apply:Nnnnn #1 #2 #3 #4 #5
+\cs_set_protected:Nn \__erw_tl_map:nn
{
- #1{#2}{#3}{#4}{#5}
+ \quark_if_recursion_tail_stop:n{#1}
+ \g__erw_tl_function:n{#1} \__erw_tl_map:nn{#2}
}
-\cs_set:Npn \__erw_map_thread_at:Nnn #1 #2 #3
+\cs_set_protected:Nn \__erw_tl_map_thread_at:Nnn
{
- \erw_apply:Nn #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
+ #1
+ {\exp_args:Nf\tl_item:nn {#3} {#2} }
}
-\cs_set:Npn \__erw_map_thread_at:Nnnn #1 #2 #3 #4
+\cs_set_protected:Nn \__erw_tl_map_thread_at:Nnnn
{
- \erw_apply:Nnn #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
- {\exp_args:Nf\tl_item:nn {#4} {#2} }
+ #1
+ {\exp_args:Nf\tl_item:nn {#3} {#2} }
+ {\exp_args:Nf\tl_item:nn {#4} {#2} }
}
-\cs_set:Npn \__erw_map_thread_at:Nnnnn #1 #2 #3 #4 #5
+\cs_set_protected:Nn \__erw_tl_map_thread_at:Nnnnn
{
- \erw_apply:Nnnn #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
- {\exp_args:Nf\tl_item:nn {#4} {#2} }
- {\exp_args:Nf\tl_item:nn {#5} {#2} }
+ #1
+ {\exp_args:Nf\tl_item:nn {#3} {#2} }
+ {\exp_args:Nf\tl_item:nn {#4} {#2} }
+ {\exp_args:Nf\tl_item:nn {#5} {#2} }
}
-\cs_set:Npn \__erw_map_thread_at:Nnnnnn #1 #2 #3 #4 #5 #6
+\cs_set_protected:Nn \__erw_tl_map_thread_at:Nnnnnn
{
- \erw_apply:Nnnnn #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
- {\exp_args:Nf\tl_item:nn {#4} {#2} }
- {\exp_args:Nf\tl_item:nn {#5} {#2} }
- {\exp_args:Nf\tl_item:nn {#6} {#2} }
+ #1
+ {\exp_args:Nf\tl_item:nn {#3} {#2} }
+ {\exp_args:Nf\tl_item:nn {#4} {#2} }
+ {\exp_args:Nf\tl_item:nn {#5} {#2} }
+ {\exp_args:Nf\tl_item:nn {#6} {#2} }
}
-\cs_set:Npn \erw_map_thread_at:Nnn #1 #2 #3
+\cs_new:Nn \__erw_tl_separators:nn
{
- \exp_args:Nf\int_case:nnTF
- {
- \tl_count:n{#3}
- }
- {
- {1}{ \__erw_map_thread_at:Nnn #1{#2}#3 }
- {2}{ \__erw_map_thread_at:Nnnn #1{#2}#3 }
- {3}{ \__erw_map_thread_at:Nnnnn #1{#2}#3 }
- {4}{ \__erw_map_thread_at:Nnnnnn #1{#2}#3 }
- }
- {
- % Do nothing
- }
+ \int_case:nnTF {#1}
+ {
+ {1}
+ { \prg_replicate:nn{ 3 }{#2} }
+ {2}
{
- \msg_error:nnn{erw}
- {generic}
- {erw_map_thread_at:~count~of~#3~not~withing~1~to~4}
+ { \use_ii:nn #2 }
+ { \use_i:nn #2 }
+ { \use_i:nn #2 \use_ii:nn #2 }
}
+ {3}{#2}
+ }
+ { \c_empty_tl }
+ {
+ \msg_error:nnnn { __erw }
+ { separ }
+ { \__erw_tl_separators:nn }
+ {#2}
+ }
}
-\cs_set:Npn \erw_map_thread:Nn #1 #2
+\cs_generate_variant:Nn \__erw_tl_separators:nn { e }
+\cs_new:Nn \erw_tl_append_item:nn
{
- % TODO check that #2 is a matrix
- \int_step_inline:nn
- {
- \exp_args:Nf \tl_count:n{ \tl_head:n{#2} }
- }
- {
- \erw_map_thread_at:Nnn #1 {##1} {#2}
- }
+ {#1{#2}}
+}
+\cs_new:Nn \erw_tl_fold:NN
+{
+ \use:c{tl_set:\g__erw_tl_fold_set_par_tl}
+ #2
+ {
+ \use:c{exp_args:\g__erw_tl_fold_apply_par_tl}{#1}{#2}
+ }
}
-\int_new:N \__erw_numbrd_cs_int
-\cs_set:Npn \erw_numbrd_cs_name:n #1{__erw_numbrd_cs_\int_to_alph:n{#1}:n}
-\cs_set:Npn \erw_numbrd_cs_name_braced:n #1{{\erw_numbrd_cs_name:n{#1}}}
-\tl_set:Nn \__erw_numbrd_cs_name_tl {\erw_numbrd_cs_name:n{\__erw_numbrd_cs_int}}
-\cs_set:Npn \erw_numbrd_cs:nn #1 #2
+\cs_generate_variant:Nn \erw_tl_fold:NN {cN}
+\cs_new:Nn \erw_tl_gset_function:N
{
- \erw_apply:cn{__erw_numbrd_cs_\int_to_alph:n{#1}:n}{#2}
+ \erw_cs_gset_eq:NN \g__erw_tl_function:n #1
}
-\cs_new_protected:Npn \erw_numbrd_cs_reset:
+\cs_new:Nn \erw_tl_gset_function:n
{
- \int_zero:N \__erw_numbrd_cs_int
- \tl_set:Nn \__erw_numbrd_cs_ext_tl{}
+ \erw_cs_gset_inline:Nn \g__erw_tl_function:n {#1}
}
-\cs_new_protected:Npn \erw_numbrd_cs_new:n #1
+\cs_new:Nn \erw_tl_last_item:n
{
- \int_incr:N \__erw_numbrd_cs_int
- \erw_cs_set_inline:cn{\__erw_numbrd_cs_name_tl}
- {
- \token_if_cs:NTF
- {#1}
- {#1{##1}}
- {#1}
- }
+ \exp_args:Nof \tl_item:nn
+ {#1}
+ {
+ \tl_count:n{#1}
+ }
}
-\cs_new:Npn \erw_numbrd_cs_names:nnn #1 #2 #3
+\cs_new:Nn \erw_tl_join:nn{#1#2}
+\cs_new:Nn \erw_tl_join:nnn{#1#2#3}
+\cs_new:Nn \erw_tl_join:nnnn{#1#2#3#4}
+\cs_new:Nn \erw_tl_join:nnnnn{#1#2#3#4#5}
+\cs_new_protected:Nn \erw_tl_map:n
{
- \int_step_function:nnnN { #1 }{ #2 }{ #3 } \erw_numbrd_cs_name:n
+ \__erw_tl_map:nn#1\q_recursion_tail\q_recursion_stop\q_recursion_tail\q_recursion_stop
}
-\cs_new:Npn \erw_numbrd_cs_names_braced:nnn #1 #2 #3
+\cs_new_protected:Nn \erw_tl_map:Nn
{
- \int_step_function:nnnN { #1 }{ #2 }{ #3 } \erw_numbrd_cs_name_braced:n
- % TODO \tl_range_braced:nnn?
+ \cs_set_eq:NN \g__erw_tl_function:n #1
+ \erw_tl_map:n{#2}
}
-\cs_new:Npn \erw_numbrd_cs_names_braced:
+\cs_new_protected:Nn \erw_tl_map_inline:nn
{
- \erw_numbrd_cs_names_braced:nnn{1}{1}{\__erw_numbrd_cs_int}
+ \erw_cs_set_inline:Nn \g__erw_tl_function:n {#1}
+ \erw_tl_map:n{#2}
}
-\NewDocumentCommand{\numbrdcsnew}{ s m }
+\cs_new:Nn \erw_tl_repeat:nn
{
- \IfBooleanTF{#1}
- {}
- { \erw_numbrd_cs_reset:{}}
- \tl_map_function:nN {#2}\erw_numbrd_cs_new:n
+ \int_step_inline:nnnn{1}{1}{#1}{#2}
+}
+\cs_new:Nn \erw_tl_split:nnn
+{
+ \tl_head:n{#1}
+ \use:c{exp_args:#3} \tl_map_inline:nn
+ {
+ \tl_tail:n
+ {
+ #1
+ }
+ }{#2##1}
+}
+\cs_new:Nn \erw_tl_split:nn
+{
+ \erw_tl_split:nnn{#1}{#2}{Nf}
+}
+\cs_new_protected:Nn \erw_tl_map_thread_at:Nnn
+{
+ \exp_args:Nf\int_case:nnTF
+ {
+ \tl_count:n{#3}
+ }
+ {
+ {1}{ \__erw_tl_map_thread_at:Nnn #1{#2}#3 }
+ {2}{ \__erw_tl_map_thread_at:Nnnn #1{#2}#3 }
+ {3}{ \__erw_tl_map_thread_at:Nnnnn #1{#2}#3 }
+ {4}{ \__erw_tl_map_thread_at:Nnnnnn #1{#2}#3 }
+ }
+ {
+ % Do nothing
+ }
+ {
+ \msg_error:nnn{__erw}
+ {generic}
+ {erw_tl_map_thread_at:~count~of~#3~not~withing~1~to~4}
+ }
+}
+\cs_new_protected:Nn \erw_tl_map_thread:Nn
+{
+ \int_step_inline:nn
+ {
+ \exp_args:Nf \tl_count:n{ \tl_head:n{#2} }
+ }
+ {
+ \erw_tl_map_thread_at:Nnn #1 {##1} {#2}
+ }
}
-\NewDocumentCommand{\numbrdcs}{ m m }
+\cs_new:Nn \erw_tl_separators:n
{
- \erw_numbrd_cs:nn{#1}{#2}
+ \__erw_tl_separators:en{ \tl_count:n{#1} }{#1}
}
\ExplSyntaxOff
%%
-%% Copyright (C) 2018 by Erwann Rogard
+%% Copyright (C) 2018-2020 by Erwann Rogard
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either
@@ -395,10 +509,8 @@
%% This work is "maintained" (as per LPPL maintenance status) by
%% Erwann Rogard.
%%
-%% This work consists of the file erw-l3.dtx
-%% and the derived files erw-l3.ins,
-%% erw-l3.pdf and
-%% erw-l3.sty.
+%% This work consists of the file erw-l3.dtx and the derived files:
+%% erw-l3.sty, and erw-l3.pdf.
%%
%%
%% End of file `erw-l3.sty'.