From 1d7023c368d68a983faaee4c22fa6700a89393f8 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 22 Jan 2015 18:27:20 +0100 Subject: Implemented Scheme like `Concatenate` in terms of `Fold` and `Append` * added appropriate test case --- src/list/operation/concatenate.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/list/operation/concatenate.h (limited to 'src/list/operation') diff --git a/src/list/operation/concatenate.h b/src/list/operation/concatenate.h new file mode 100644 index 0000000..944470b --- /dev/null +++ b/src/list/operation/concatenate.h @@ -0,0 +1,18 @@ +#ifndef TYPEASVALUE_SRC_LIST_OPERATION_CONCATENATE_H_ +#define TYPEASVALUE_SRC_LIST_OPERATION_CONCATENATE_H_ + +#include "append.h" +#include "higher/fold.h" + +namespace tav { + +template +using Concatenate = Fold< + Append, + void, + ListOfLists +>; + +} + +#endif // TYPEASVALUE_SRC_LIST_OPERATION_CONCATENATE_H_ -- cgit v1.2.3