Wrapping it in a function seems to work fine, although it will be if you 
don't declare c as const:


   1. macro map_(expr, args...)
   2.     quote
   3.         @assert all([map(length, ($(args...),))...] .== length($(args[
   1])))
   4.         out = Array(typeof($(indexify(expr, 1, args))), size($(args[1]
   )))
   5.         for i in 1:length(out)
   6.             @inbounds out[i] = $(indexify(expr, :i, args))
   7.         end
   8.         out
   9.     end
   10. end
   11.  
   12. macro map(expr, args...)
   13.     quote
   14.         function dummy_fun($(args...))
   15.             @map_($expr,$(args...))
   16.         end
   17.         dummy_fun($(args...))
   18.     end
   19. end
   

Reply via email to