MCPcopy Create free account
hub / github.com/Dobiasd/FunctionalPlus / effect_to_std_function

Function effect_to_std_function

include/fplus/side_effects.hpp:218–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216// Converts an arbitrary callable effect to an std::function.
217template <typename Effect>
218std::function<internal::invoke_result_t<Effect>()> effect_to_std_function(Effect eff)
219{
220 return [eff] {
221 return internal::invoke(eff);
222 };
223}
224
225// API search type: execute_max_n_times_until_success : (Int, Io (), Int) -> Io Bool
226// Returns a function that (when called) executes a side effect

Callers 1

Calls 1

invokeFunction · 0.50

Tested by

no test coverage detected