From 34530d8532e22afe0026b956ae395ddc666351b3 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 26 Feb 2015 19:06:34 +0100 Subject: Enabled `Concatenate` to concatenate a variadic pack of lists * analogously to arbitrary list count concatenation in Scheme's `append` ** implemented for `Concatenate` instead as it fits better with the structure between `Append` and `Concatenate` --- src/list/operation/concatenate.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/list/operation/concatenate.h') diff --git a/src/list/operation/concatenate.h b/src/list/operation/concatenate.h index a5cbaa6..cf680c1 100644 --- a/src/list/operation/concatenate.h +++ b/src/list/operation/concatenate.h @@ -2,16 +2,23 @@ #define TYPEASVALUE_SRC_LIST_OPERATION_CONCATENATE_H_ #include "append.h" -#include "higher/remove.h" #include "higher/fold.h" +#include "conditional/if.h" namespace tav { -template +template < + typename Head, + typename... Tail +> using Concatenate = Fold< Append, void, - ListOfLists + If< + Boolean, + Head, + List + > >; } -- cgit v1.2.3