3 ms·
if you want tail calls in Julia, there is a 3 line macro that gives it to you.
by adgjlsfhk1 5y ago
if you want tail calls in Julia, there is a 3 line macro that gives it to you.
- tbenst 5y agoCould you point to it? Thanks
- ted_dunning 5y agoHere is one: https://github.com/TakekazuKATO/TailRec.jl https://github.com/TakekazuKATO/TailRec.jl It works by inspecting the code and rewriting a function to turn tail calls into loops. The interesting bit is that it was very easy to write because of the strong macros in Julia.
- adenozine 5y agoThis is eye opening. I might take a look at this in depth and try Julia again.
- nick__m 5y agoThis repo should interest you https://github.com/TakekazuKATO/TailRec.jl https://github.com/TakekazuKATO/TailRec.jl