diff options
Diffstat (limited to 'src/list/operation/higher/misc.h')
-rw-r--r-- | src/list/operation/higher/misc.h | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/list/operation/higher/misc.h b/src/list/operation/higher/misc.h deleted file mode 100644 index feec7de..0000000 --- a/src/list/operation/higher/misc.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_MISC_H_ -#define TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_MISC_H_ - -#include "fold.h" -#include "conditional/if.h" - -namespace tav { - -template < - template<typename> class Function, - typename List -> -class Map { - private: - template < - typename Current, - typename Previous - > - struct function_wrapper { - typedef Cons< - typename Function<Current>::type, - Previous - > type; - }; - - public: - typedef typename Fold<function_wrapper, void, List>::type type; - -}; - -template < - template<typename> class Function, - typename List -> -class Filter { - private: - template < - typename Current, - typename Previous - > - struct function_wrapper { - typedef If< - Function<Current>::type::value, - Cons<Current, Previous>, - Previous - > type; - }; - - public: - typedef typename Fold<function_wrapper, void, List>::type type; - -}; - -} - -#endif // TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_MISC_H_ |