On Sun, Sep 25, 2016 at 1:09 PM, Jamie Brandon
wrote:
> Here is some code I just wrote this evening:
>
> n = length(T.parameters)
> index_types = typeof_index(T.parameters)
> pushes = map(1:n) do i
> :(push!(columns[$i], $(Symbol("key_$i"
> end
>
Here is some code I just wrote this evening:
n = length(T.parameters)
index_types = typeof_index(T.parameters)
pushes = map(1:n) do i
:(push!(columns[$i], $(Symbol("key_$i"
end
body = quote $(pushes...) end
for i in n:-1:1
body = quote
$(Symbol("keys_$i")) =
On Sun, Sep 25, 2016 at 12:39 PM, Jamie Brandon
wrote:
> I'm doing a lot of code-generation. There are two patterns that come up all
> over the place - adding a suffix to a symbol and interpolating from an array
> comprehension. This is pretty verbose even in the
I'm doing a lot of code-generation. There are two patterns that come up all
over the place - adding a suffix to a symbol and interpolating from an
array comprehension. This is pretty verbose even in the simplest case:
quote
...
row = tuple($([:($(Symbol("val_$ix))) for ix in order]...))
...