From c7dbff81e5e51a5793c47418b09af2e5c611004d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 12 Mar 2021 06:41:59 +0200 Subject: [PATCH] Document mp_join --- doc/mp11/algorithm.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/mp11/algorithm.adoc b/doc/mp11/algorithm.adoc index 37e32f5..bfd0d70 100644 --- a/doc/mp11/algorithm.adoc +++ b/doc/mp11/algorithm.adoc @@ -584,6 +584,20 @@ is `L>`. `mp_split, S>` is `L, L, S>` is `L, L, L<>, L<>>`. +## mp_join + + template using mp_join = /*...*/; + +`mp_join` is the reverse operation of `mp_split`; it takes a list of segments `L` and joins +them into a single list, inserting the separator `S` between them. + +`mp_join, S>` yields back the original list `L`. + +For example, `mp_split, S>` gives `L, L>`, and +`mp_join, L>, S>` results in `L`. + +`mp_join` is equivalent to (and is implemented as) `mp_apply>>`. + ## mp_partition template class P> using mp_partition = /*...*/;