digitalmars.D.learn - Operating on a Variadic Function Parameter Set
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (13/13) Nov 16 2014 If I have a variadic function such as in
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (2/7) Nov 16 2014 I just found out that Tuple member expand does what I want here.
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (4/17) Nov 16 2014 I cracked skipOverBackShortestOf too at
If I have a variadic function such as in
haystack.find(needles)
what options do I have for defining needles in compile-time
outside of this expression and call find() with this definition
as arguments possibly multiple-times?
Is std.typecons.Tuple my only option here?
Further, is it possible to operate on this parameter set in
compile-time such as in my case reversing all the arguments
before feeding them as a variadic set of function parameters?
I need this in my module
https://github.com/nordlow/justd/blob/master/skip_ex.d#L122
when implementing skipOverBackShortestOf who needs to call retro
on each of the needles.
Nov 16 2014
On Sunday, 16 November 2014 at 11:40:16 UTC, Nordlöw wrote:
If I have a variadic function such as in
haystack.find(needles)
what options do I have for defining needles in compile-time
outside of this expression and call find() with this definition
as arguments possibly multiple-times?
I just found out that Tuple member expand does what I want here.
Nov 16 2014
On Sunday, 16 November 2014 at 11:40:16 UTC, Nordlöw wrote:
If I have a variadic function such as in
haystack.find(needles)
what options do I have for defining needles in compile-time
outside of this expression and call find() with this definition
as arguments possibly multiple-times?
Is std.typecons.Tuple my only option here?
Further, is it possible to operate on this parameter set in
compile-time such as in my case reversing all the arguments
before feeding them as a variadic set of function parameters?
I need this in my module
https://github.com/nordlow/justd/blob/master/skip_ex.d#L122
when implementing skipOverBackShortestOf who needs to call
retro on each of the needles.
I cracked skipOverBackShortestOf too at
https://github.com/nordlow/justd/blob/master/skip_ex.d#L133
:)
Nov 16 2014









=?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> 