| 216 | // Converts an arbitrary callable effect to an std::function. |
| 217 | template <typename Effect> |
| 218 | std::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 |
no test coverage detected