Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 928 Bytes

File metadata and controls

59 lines (39 loc) · 928 Bytes

Types

We've introduced a bunch of custom types to let the code be more readable.

Any definition act as aliases for more convolute type we use.

Predicate

template<class A>
using Predicate = std::function<bool(const A&)>;

This type define a function that reutn a boolena using the template type as input parameter.

Nullary

template<class A>
using Nullary = std::function<A()>;

Unary

template<class A, class B>
using Unary = std::function<B(const A&)>;

Binary

template<class A, class B, class C>
using Binary = std::function<C(const A&, const B&)>;

Guard

template<class B, class A>
using Guard = std::tuple<Predicate<A>, Unary<B, A>>;

GuardVector

template<class B, class A>
using GuardVector = std::vector<Guard<B, A>>;

Guards

template<class B, class A>
using Guards = TinyFp::Sequence<Guard<B, A>>;