aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/higher
diff options
context:
space:
mode:
Diffstat (limited to 'src/list/operation/higher')
-rw-r--r--src/list/operation/higher/drop_while.h8
-rw-r--r--src/list/operation/higher/filter.h8
-rw-r--r--src/list/operation/higher/find.h8
-rw-r--r--src/list/operation/higher/fold.h6
-rw-r--r--src/list/operation/higher/map.h4
-rw-r--r--src/list/operation/higher/partition.h4
-rw-r--r--src/list/operation/higher/query.h8
-rw-r--r--src/list/operation/higher/sort.h28
-rw-r--r--src/list/operation/higher/take_while.h12
9 files changed, 43 insertions, 43 deletions
diff --git a/src/list/operation/higher/drop_while.h b/src/list/operation/higher/drop_while.h
index ad1553f..8ba2664 100644
--- a/src/list/operation/higher/drop_while.h
+++ b/src/list/operation/higher/drop_while.h
@@ -10,11 +10,11 @@ template <
typename Current
>
struct DropWhile {
- typedef typename If<
- Predicate<Head<Current>>::type::value,
- typename DropWhile<Predicate, Tail<Current>>::type,
+ typedef Eval<If<
+ Eval<Predicate<Head<Current>>>,
+ Eval<DropWhile<Predicate, Tail<Current>>>,
Current
- >::type type;
+ >> type;
};
template <
diff --git a/src/list/operation/higher/filter.h b/src/list/operation/higher/filter.h
index acc1422..3588400 100644
--- a/src/list/operation/higher/filter.h
+++ b/src/list/operation/higher/filter.h
@@ -17,13 +17,13 @@ class Filter {
typename Previous
>
using predicate_wrapper = If<
- Predicate<Current>::type::value,
- typename Cons<Current, Previous>::type,
+ Eval<Predicate<Current>>,
+ Eval<Cons<Current, Previous>>,
Previous
>;
public:
- typedef typename Fold<predicate_wrapper, void, List>::type type;
+ typedef Eval<Fold<predicate_wrapper, void, List>> type;
};
@@ -37,7 +37,7 @@ class Remove {
using predicate_negator = Not<Predicate<Element>>;
public:
- typedef typename Filter<predicate_negator, List>::type type;
+ typedef Eval<Filter<predicate_negator, List>> type;
};
diff --git a/src/list/operation/higher/find.h b/src/list/operation/higher/find.h
index bf9d04f..abc3199 100644
--- a/src/list/operation/higher/find.h
+++ b/src/list/operation/higher/find.h
@@ -11,11 +11,11 @@ template <
typename Current
>
struct Find {
- typedef typename If<
- Predicate<Head<Current>>::type::value,
+ typedef Eval<If<
+ Eval<Predicate<Head<Current>>>,
Head<Current>,
- typename Find<Predicate, Tail<Current>>::type
- >::type type;
+ Eval<Find<Predicate, Tail<Current>>>
+ >> type;
};
template <
diff --git a/src/list/operation/higher/fold.h b/src/list/operation/higher/fold.h
index 6ad4bd7..3ed0a42 100644
--- a/src/list/operation/higher/fold.h
+++ b/src/list/operation/higher/fold.h
@@ -9,10 +9,10 @@ template <
typename Current
>
struct Fold {
- typedef typename Function<
+ typedef Eval<Function<
Head<Current>,
- typename Fold<Function, Initial, Tail<Current>>::type
- >::type type;
+ Eval<Fold<Function, Initial, Tail<Current>>>
+ >> type;
};
template <
diff --git a/src/list/operation/higher/map.h b/src/list/operation/higher/map.h
index 9cb6524..ac214b7 100644
--- a/src/list/operation/higher/map.h
+++ b/src/list/operation/higher/map.h
@@ -16,12 +16,12 @@ class Map {
typename Previous
>
using function_wrapper = Cons<
- typename Function<Current>::type,
+ Eval<Function<Current>>,
Previous
>;
public:
- typedef typename Fold<function_wrapper, void, List>::type type;
+ typedef Eval<Fold<function_wrapper, void, List>> type;
};
diff --git a/src/list/operation/higher/partition.h b/src/list/operation/higher/partition.h
index aed0ea6..eedeb91 100644
--- a/src/list/operation/higher/partition.h
+++ b/src/list/operation/higher/partition.h
@@ -10,8 +10,8 @@ template <
typename Elements
>
using Partition = Cons<
- typename Filter<Predicate, Elements>::type,
- typename Remove<Predicate, Elements>::type
+ Eval<Filter<Predicate, Elements>>,
+ Eval<Remove<Predicate, Elements>>
>;
}
diff --git a/src/list/operation/higher/query.h b/src/list/operation/higher/query.h
index d2b8e76..1d00267 100644
--- a/src/list/operation/higher/query.h
+++ b/src/list/operation/higher/query.h
@@ -15,7 +15,7 @@ template <
using Any = Fold<
Or,
Boolean<false>,
- typename Map<Predicate, List>::type
+ Eval<Map<Predicate, List>>
>;
template <
@@ -25,7 +25,7 @@ template <
using All = Fold<
And,
Boolean<true>,
- typename Map<Predicate, List>::type
+ Eval<Map<Predicate, List>>
>;
template <
@@ -33,7 +33,7 @@ template <
typename List
>
using None = Not<
- typename Any<Predicate, List>::type
+ Eval<Any<Predicate, List>>
>;
template <
@@ -43,7 +43,7 @@ template <
using Count = Fold<
Add,
tav::Size<0>,
- typename Map<Predicate, List>::type
+ Eval<Map<Predicate, List>>
>;
}
diff --git a/src/list/operation/higher/sort.h b/src/list/operation/higher/sort.h
index 5a4009c..cf86e9b 100644
--- a/src/list/operation/higher/sort.h
+++ b/src/list/operation/higher/sort.h
@@ -14,25 +14,25 @@ template <
>
class Sort {
private:
- using index = Divide<typename Length<Sequence>::type, Size<2>>;
- using pivot = typename Nth<index, Sequence>::type;
+ using index = Divide<Eval<Length<Sequence>>, Size<2>>;
+ using pivot = Eval<Nth<index, Sequence>>;
- using partitions = typename Partition<
+ using partitions = Eval<Partition<
Apply<Comparator, pivot, _0>::template function,
- typename DeleteNth<index, Sequence>::type
- >::type;
+ Eval<DeleteNth<index, Sequence>>
+ >>;
- using lhs = typename Car<partitions>::type;
- using rhs = typename Cdr<partitions>::type;
+ using lhs = Eval<Car<partitions>>;
+ using rhs = Eval<Cdr<partitions>>;
public:
- typedef typename Concatenate<
- typename List<
- typename Sort<Comparator, lhs>::type,
- typename List<pivot>::type,
- typename Sort<Comparator, rhs>::type
- >::type
- >::type type;
+ typedef Eval<Concatenate<
+ Eval<List<
+ Eval<Sort<Comparator, lhs>>,
+ Eval<List<pivot>>,
+ Eval<Sort<Comparator, rhs>>
+ >>
+ >> type;
};
template <template<typename, typename> class Comparator>
diff --git a/src/list/operation/higher/take_while.h b/src/list/operation/higher/take_while.h
index d04dc2d..8e61c45 100644
--- a/src/list/operation/higher/take_while.h
+++ b/src/list/operation/higher/take_while.h
@@ -10,14 +10,14 @@ template <
typename Current
>
struct TakeWhile {
- typedef typename If<
- Predicate<Head<Current>>::type::value,
- typename Cons<
+ typedef Eval<If<
+ Eval<Predicate<Head<Current>>>,
+ Eval<Cons<
Head<Current>,
- typename TakeWhile<Predicate, Tail<Current>>::type
- >::type,
+ Eval<TakeWhile<Predicate, Tail<Current>>>
+ >>,
void
- >::type type;
+ >> type;
};
template <