aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/take.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/list/operation/take.h')
-rw-r--r--src/list/operation/take.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/list/operation/take.h b/src/list/operation/take.h
index fdff123..effba33 100644
--- a/src/list/operation/take.h
+++ b/src/list/operation/take.h
@@ -5,18 +5,20 @@
namespace tav {
+namespace detail {
+
template <
typename Count,
typename Current
>
struct Take {
- typedef Eval<Cons<
+ typedef Cons<
Head<Current>,
Eval<Take<
Substract<Count, Size<1>>,
Tail<Current>
>>
- >> type;
+ > type;
};
template <typename Current>
@@ -34,6 +36,13 @@ struct Take<Size<0>, void> {
typedef void type;
};
+}
+
+template <
+ typename Count,
+ typename Current
+>
+using Take = Eval<detail::Take<Count, Current>>;
}