Dobiasd / FunctionalPlus

Functional Programming Library for C++. Write concise and readable C++ code.
http://www.editgym.com/fplus-api-search/
Boost Software License 1.0
2.1k stars 167 forks source link

Add `get` and non-returning `effect/effect_one` for variant #290

Closed tom91136 closed 9 months ago

tom91136 commented 9 months ago

This PR addresses #285

The following additions/changes were made:

Dobiasd commented 9 months ago

Removed an extra <iostream> header, probably introduced during debugging.

Oh, thanks! ^^

Added effect_one and effect for void lambdas.

Perfect. :+1:

Added get that returns a maybe for extracting values.

This will play together really nice with the new monadic (fluent) interface for maybe from the other PR. (E.g.: some_variant.get<int>().get_with_default(42)). :100: