aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/list/operation/higher/query.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/list/operation/higher/query.h b/src/list/operation/higher/query.h
new file mode 100644
index 0000000..56bb203
--- /dev/null
+++ b/src/list/operation/higher/query.h
@@ -0,0 +1,30 @@
+#ifndef TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_QUERY_H_
+#define TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_QUERY_H_
+
+#include "operation/logic.h"
+
+namespace tav {
+
+template <
+ template<typename> class Function,
+ typename List
+>
+using Any = Fold<
+ Or,
+ Boolean<false>,
+ typename Map<Function, List>::type
+>;
+
+template <
+ template<typename> class Function,
+ typename List
+>
+using All = Fold<
+ And,
+ Boolean<true>,
+ typename Map<Function, List>::type
+>;
+
+}
+
+#endif // TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_QUERY_H_