diff options
Diffstat (limited to 'src/list')
-rw-r--r-- | src/list/operation/contains.h | 14 | ||||
-rw-r--r-- | src/list/operation/delete.h | 14 |
2 files changed, 10 insertions, 18 deletions
diff --git a/src/list/operation/contains.h b/src/list/operation/contains.h index d3f95fa..51d7d9f 100644 --- a/src/list/operation/contains.h +++ b/src/list/operation/contains.h @@ -3,6 +3,7 @@ #include "type.h" #include "higher/query.h" +#include "function/apply.h" namespace tav { @@ -10,15 +11,10 @@ template < typename Element, typename List > -class Contains { - private: - template <typename Current> - using comparator = EqualValue<Current, Element>; - - public: - typedef typename Any<comparator, List>::type type; - -}; +using Contains = Any< + Apply<EqualValue, tav::_0, Element>::template single_type, + List +>; } diff --git a/src/list/operation/delete.h b/src/list/operation/delete.h index ad0a4cf..2ff674c 100644 --- a/src/list/operation/delete.h +++ b/src/list/operation/delete.h @@ -3,6 +3,7 @@ #include "type.h" #include "higher/filter.h" +#include "function/apply.h" namespace tav { @@ -10,15 +11,10 @@ template < typename Element, typename List > -class Delete { - private: - template <typename Current> - using comparator = EqualValue<Current, Element>; - - public: - typedef typename Remove<comparator, List>::type type; - -}; +using Delete = Remove< + Apply<EqualValue, tav::_0, Element>::template single_type, + List +>; } |