#ifndef TYPEASVALUE_SRC_LIST_LIST_H_ #define TYPEASVALUE_SRC_LIST_LIST_H_ #include "cons.h" namespace tav { template < typename Head, typename... Tail > struct List { typedef Cons< Head, typename List::type > type; }; template struct List { typedef Cons type; }; template using Head = Car; template using Tail = Cdr; template struct Length { typedef Add, typename Length>::type> type; }; template <> struct Length { typedef Size<0> type; }; template < typename Primary, typename Secondary > struct Concatenate { typedef Cons< Head, typename Concatenate< Tail, Secondary >::type > type; }; template struct Concatenate { typedef Secondary type; }; } #endif // TYPEASVALUE_SRC_LIST_LIST_H_