Those methods both work, and help me understand metaprogramming a little.
Thanks to you both.
On Fri, May 13, 2016 at 8:37 AM, Tom Breloff wrote:
> I think this will work:
>
>> for (fn, arg) = ((:toucha, "a"), (:touchb, "b"))
>> cmd = `touch $arg`
>> @eval $fn() = run($cmd)
I believe `` @eval $fn() = run($`touch $arg`) `` also works
>> end
>
>
>
> On Fri, May
I think this will work:
for (fn, arg) = ((:toucha, "a"), (:touchb, "b"))
> cmd = `touch $arg`
> @eval $fn() = run($cmd)
> end
On Fri, May 13, 2016 at 7:34 AM, Andrew Gibb wrote:
> I'm trying to use metaprogramming to create two functions. Each of which
>
I'm trying to use metaprogramming to create two functions. Each of which
includes a similar, long, call to run(). The calls are not quite identical.
Some flags have different arguments, and some are only present on one call.
I can't work out how to get expression interpolation to happen within