Forwarding arguments through a std.algorithm.map
Stefan Koch
uplink.coder at googlemail.com
Sun Mar 11 13:35:12 UTC 2018
On Saturday, 10 March 2018 at 20:48:06 UTC, Nordlöw wrote:
> 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?
there is staticMap.
More information about the Digitalmars-d-learn
mailing list