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