aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/concatenate.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-01-22 18:27:20 +0100
committerAdrian Kummerlaender2015-01-22 18:27:20 +0100
commit1d7023c368d68a983faaee4c22fa6700a89393f8 (patch)
tree810bc1de16ef0484f57b4ead88b3c1e026addd9b /src/list/operation/concatenate.h
parent2e58bae3b46dc292736bbdbba6d4ee56b1ee51ed (diff)
downloadTypeAsValue-1d7023c368d68a983faaee4c22fa6700a89393f8.tar
TypeAsValue-1d7023c368d68a983faaee4c22fa6700a89393f8.tar.gz
TypeAsValue-1d7023c368d68a983faaee4c22fa6700a89393f8.tar.bz2
TypeAsValue-1d7023c368d68a983faaee4c22fa6700a89393f8.tar.lz
TypeAsValue-1d7023c368d68a983faaee4c22fa6700a89393f8.tar.xz
TypeAsValue-1d7023c368d68a983faaee4c22fa6700a89393f8.tar.zst
TypeAsValue-1d7023c368d68a983faaee4c22fa6700a89393f8.zip
Implemented Scheme like `Concatenate` in terms of `Fold` and `Append`
* added appropriate test case
Diffstat (limited to 'src/list/operation/concatenate.h')
-rw-r--r--src/list/operation/concatenate.h18
1 files changed, 18 insertions, 0 deletions
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 <typename ListOfLists>
+using Concatenate = Fold<
+ Append,
+ void,
+ ListOfLists
+>;
+
+}
+
+#endif // TYPEASVALUE_SRC_LIST_OPERATION_CONCATENATE_H_