aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/higher/misc.h
blob: 708265a73224a49f9c5d406160f975052fd2b550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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_