Forwarding arguments through a std.algorithm.map
Nordlöw
per.nordlow at gmail.com
Sat Mar 10 20:48:06 UTC 2018
If I have a function
bool f(Rs...)(Rs rs)
is it somehow possible to map and forward all its arguments `rs`
to another function
bool g(Rs...)(Rs rs);
through a call to some map-and-forward-like-function `forwardMap`
in something like
bool f(Rs...)(Rs rs)
{
alias someArbitraryFun = _ => _;
return g(forwardMap!(someArbitraryFun)(rs));
}
?
What should the definition of forwardMap look like?
Does Phobos contain something like this already?
More information about the Digitalmars-d-learn
mailing list