MCPcopy Create free account
hub / github.com/ConorWilliams/libfork / doubler

Function doubler

test/source/algorithm/fold.cpp:48–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47template <typename F>
48auto doubler(F fun) {
49 return [fun]<class T>(auto /* unused */, T x) -> task<T> {
50 co_return 2 * co_await lf::just(fun)(std::forward<T>(x));
51 };
52}
53
54template <typename Sch, typename F, typename Proj = std::identity>
55void test(Sch &&sch, F sum, Proj proj = {}) {

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected