aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/higher/query.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/list/operation/higher/query.h')
-rw-r--r--src/list/operation/higher/query.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/list/operation/higher/query.h b/src/list/operation/higher/query.h
index 29f65dc..c6eabc7 100644
--- a/src/list/operation/higher/query.h
+++ b/src/list/operation/higher/query.h
@@ -3,6 +3,7 @@
#include "fold.h"
#include "misc.h"
+#include "operation/math.h"
#include "operation/logic.h"
namespace tav {
@@ -35,6 +36,16 @@ using None = Not<
typename Any<Function, List>::type
>;
+template <
+ template<typename> class Function,
+ typename List
+>
+using Count = Fold<
+ Add,
+ tav::Size<0>,
+ typename Map<Function, List>::type
+>;
+
}
#endif // TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_QUERY_H_