Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 683 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 683 Bytes

typelist

Type-level sortable singly linked list

Motivation

The main purpose is to represent composite units in typeunits

Because Rust lacks variadic generics, the list is implemented as a recursively nested tuple.

This is similar to typenum::TArr, but typelist produces much shorter types in compilation errors:

type List1 = (((() Const<1>), Const<2>), Const<3>)
type List2 = TArr<TArr<TArr<ATerm, Const<1>>, Const<2>>, Const<3>>;

Features

  • merge sort
  • minimum
  • maximum
  • concatenation
  • push
  • pop
  • typenum_list![..] macro for typenum_alias::Const<N> list construction