diff --git a/type_lisp.h b/type_lisp.h index b8e36bd..97ac571 100644 --- a/type_lisp.h +++ b/type_lisp.h @@ -162,6 +162,28 @@ namespace Alepha::Hydrogen ::detail:: type_lisp_m { using type= Nil; }; + + + template< TypeListType list > + struct strip_last; + + namespace exports + { + template< typename list > + using strip_last_t= tuple_from_list_t< typename strip_last< list_from_tuple_t< list > >::type >; + } + + template< TypeListType list > + struct strip_last + { + using type= cons_t< car_t< list >, typename strip_last< cdr_t< list > >::type >; + }; + + template< typename last > + struct strip_last< TypeList< last > > + { + using type= Nil; + }; } namespace Alepha::Hydrogen::inline exports::inline type_lisp_m