| title | fn::and_then |
|---|
:include-doxygen-doc: fn::and_then_t
:include-doxygen-member: fn::and_then_t::operator() { signatureOnly: false, includeAllMatches: true }
A monadic type of the same kind.
:include-template: templates/snippet.md {
path: "simple/main.cpp",
surroundedBy: ["// example-error-struct", "// example-expected-and_then-value"],
desc: "The resulting value is 13 because ex does not contain an Error and therefore and_then is called."
}
:include-template: templates/snippet.md {
path: "simple/main.cpp",
surroundedBy: ["// example-error-struct", "// example-expected-and_then-error"],
desc: "The result is an Error because ex already contained an Error and therefore and_then is not called."
}