This is a C++17 library which implements concepts from the Category Theory. The C++ standard library partialy does this, but we put it in a different view. The main objective is to enforce the programmer to write correct code, with lesser undefined behaviour.
The tuple type: (A, B, ...)
tup<A, B, ...>
The unit type ()
unit = tup<>
The unit type singletone
nil
The variant type: A | B | ...
var<A, B, ...>
The zero type
nvr = var<>
A unique_ptr equivalent, but never nullptr
box<A>
A shared_ptr equivalent, but never nullptr
rc<A>
Memory management of A with a linked list
link<A>
The optional type: A | unit
opt<A> = var<A, unit>
The lazy type: A | nvr
lazy<A> = var<A, nvr>
The vector type (A, ...) | unit
vec<A>
The unique_ptr equivalent: box | unit
opt<box<A>>
The weak_ptr equivalent: rc | unit
opt<rc<A>>