On Friday, 16 March 2018 at 20:39:33 UTC, Andrei Alexandrescu
wrote:
My knee-jerk reaction is that's a rather peculiar primitive to
add to the standard library. -- Andrei
I'm needing it for variadic equal...I'll put it as a private
member in `equal`s template declaration for now.
On 03/16/2018 03:52 PM, Nordlöw wrote:
On Saturday, 10 March 2018 at 21:31:41 UTC, ag0aep6g wrote:
auto forwardMap(alias fun, Ts ...)(Ts things)
{
import std.meta: aliasSeqOf, staticMap;
import std.range: iota;
import std.typecons: Tuple;
alias NewType(size_t i) = typeof(fun(thin
On Saturday, 10 March 2018 at 21:31:41 UTC, ag0aep6g wrote:
auto forwardMap(alias fun, Ts ...)(Ts things)
{
import std.meta: aliasSeqOf, staticMap;
import std.range: iota;
import std.typecons: Tuple;
alias NewType(size_t i) = typeof(fun(things[i]));
alias NewTypes = staticMap!
On Saturday, 10 March 2018 at 21:31:41 UTC, ag0aep6g wrote:
Not tested beyond `f(1, 2.3, "foo")`:
auto forwardMap(alias fun, Ts ...)(Ts things)
{
import std.meta: aliasSeqOf, staticMap;
import std.range: iota;
import std.typecons: Tuple;
alias NewType(size_t i) = typeof(fun(thing
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 somet
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 somet
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);
docs:
https://dlang.org/phobos/std_traits.html#.Parameters
usage example:
On 03/10/2018 09:48 PM, 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
b