diff --git a/internals/testing/functional_test.cpp b/internals/testing/functional_test.cpp new file mode 100644 index 0000000..6cb741e --- /dev/null +++ b/internals/testing/functional_test.cpp @@ -0,0 +1,28 @@ +#include "lax_v1/arithmetic.hpp" +#include "lax_v1/functional.hpp" + +#include "config.hpp" + +static_assert(lax::value_of_v, lax::fn_t>, + lax::value_t>> == 2); + +static_assert( + lax::value_of_v>, + lax::fn_t, + lax::fn_t>>, + lax::value_t>> == 1); + +static_assert(lax::value_of_v>, + lax::fn_t, + lax::fn_t>>, + lax::value_t>> == -3); + +static_assert( + lax::value_of_v< + lax::thru_m, + lax::fn_t>, + lax::fn_t, + lax::fn_t>>> == -3); diff --git a/internals/testing/seq_test.cpp b/internals/testing/seq_test.cpp new file mode 100644 index 0000000..404a778 --- /dev/null +++ b/internals/testing/seq_test.cpp @@ -0,0 +1,26 @@ +#include "lax_v1/arithmetic.hpp" +#include "lax_v1/functional.hpp" +#include "lax_v1/seq.hpp" +#include "lax_v1/value.hpp" + +#include "config.hpp" + +#include + +using values_t = lax::Seq::t, + lax::value_t, + lax::value_t, + lax::value_t, + lax::value_t, + lax::value_t>; + +static_assert(lax::value_of_v> == 6); + +static_assert(std::is_same_v< + lax::force_t, values_t>>, + lax::Seq::t, + lax::value_t, + lax::value_t, + lax::value_t, + lax::value_t, + lax::value_t>>); diff --git a/internals/testing/tycon_test.cpp b/internals/testing/tycon_test.cpp new file mode 100644 index 0000000..d371039 --- /dev/null +++ b/internals/testing/tycon_test.cpp @@ -0,0 +1,11 @@ +#include "lax_v1/arithmetic.hpp" +#include "lax_v1/functional.hpp" +#include "lax_v1/tycon.hpp" + +#include "config.hpp" + +struct V; + +static_assert( + lax::value_of_v>>, + lax::value_t>> == 0); diff --git a/provides/include/lax_v1/functional.hpp b/provides/include/lax_v1/functional.hpp new file mode 100644 index 0000000..14bc7b8 --- /dev/null +++ b/provides/include/lax_v1/functional.hpp @@ -0,0 +1,71 @@ +#pragma once + +#include "lax_v1/logical.hpp" +#include "lax_v1/synopsis.hpp" + +template