aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/reverse.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/list/operation/reverse.h')
-rw-r--r--src/list/operation/reverse.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/list/operation/reverse.h b/src/list/operation/reverse.h
index 83691f8..d4b2be9 100644
--- a/src/list/operation/reverse.h
+++ b/src/list/operation/reverse.h
@@ -6,22 +6,20 @@
namespace tav {
-template <typename List>
+template <typename Sequence>
class Reverse {
private:
template <
typename Current,
typename Previous
>
- struct reversed_append {
- typedef typename Append<
- Previous,
- typename Cons<Current, void>::type
- >::type type;
- };
+ using reversed_append = Append<
+ Previous,
+ Eval<List<Current>>
+ >;
public:
- typedef typename Fold<reversed_append, void, List>::type type;
+ typedef Eval<Fold<reversed_append, void, Sequence>> type;
};