Tim -- would you repeat that with some simple content illustrative of a 
useful use for generation --- thx

On Wednesday, February 10, 2016 at 5:27:12 AM UTC-5, Tim Holy wrote:
>
> On Tuesday, February 09, 2016 08:52:22 PM Andy Ferris wrote: 
> > What's the best way to find the code generated by a @generated function? 
>
> This isn't easy unless you (or the author) provides a function to do so: 
>
>     @generated function foo(x, y) 
>         foo_generator(x, y) 
>     end 
>
>     function foo_generator{Tx,Ty}(::Type{Tx}, ::Type{Ty}) 
>         # generate and return the expression for the function body 
>     end 
>
> Then you can call `foo_generator(typeof(x), typeof(y))` to see the 
> returned 
> code. 
>
> Best, 
> --Tim 
>
>

Reply via email to