aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/higher/map.h
blob: ac214b7d6049af94d6c3bf377c8d1e28392e6b9e (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
30
#ifndef TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_MAP_H_
#define TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_MAP_H_

#include "fold.h"

namespace tav {

template <
	template<typename> class Function,
	typename                 List
>
class Map {
	private:
		template <
			typename Current,
			typename Previous
		>
		using function_wrapper = Cons<
			Eval<Function<Current>>,
			Previous
		>;

	public:
		typedef Eval<Fold<function_wrapper, void, List>> type;

};

}

#endif  // TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_MAP_H_