diff --git a/source/coral.cpp b/source/coral.cpp index 0d2289a..312627f 100644 --- a/source/coral.cpp +++ b/source/coral.cpp @@ -354,16 +354,6 @@ export namespace coral { returns(* dispatch)(void *, arguments...); }; - /** - * Helpful wrapper utility for using in chainable conditionals like [coral::expected::map] to check if a `bool` - * is `true` without writing a lambda. - */ - template constexpr auto equality_predicate(value reference_value) { - return [reference_value](value comparing_value) -> bool { - return comparing_value == reference_value; - }; - } - /** * Monadic container for a descriminating union of either `value_element` or `error_element`. */ diff --git a/source/coral/functional.cpp b/source/coral/functional.cpp new file mode 100644 index 0000000..93e1b85 --- /dev/null +++ b/source/coral/functional.cpp @@ -0,0 +1,15 @@ +export module coral.functional; + +import coral; + +export namespace coral { + /** + * Helpful wrapper utility for using in chainable conditionals like [coral::expected::map] to check if a `bool` + * is `true` without writing a lambda. + */ + template constexpr auto equality_predicate(value reference_value) { + return [reference_value](value comparing_value) -> bool { + return comparing_value == reference_value; + }; + } +}