I'm trying to write an unpack macro, just to learn a bit about 
meta-programming (I get it's probably not the best idea,
but sometimes you learn a lot doing stupid things), but I have to say than 
even after reading three times the doc, 
I have no idea how to do it. I wanted to do something like that:

n = [:a,:b]
p = [1 2]

@unpack n p

being transformed to:

a = p[1]
b = p[2]

But that doesn't seem to be possible because the unpack macro just get the 
expressions "n" and "p", so there's not much you can do there. 
It seems I need an unpack function first to create the correct expression:

@setvariables unpack(n,p)

Where unpack unpack(n,p) generate the expression "a b 1 2", any ideas how I 
can do that ?

Reply via email to