Gah, nevermind: function as_symbol(x) :(print(x)).args[2] end
(using print() so that it works regardless of the type) On Friday, July 3, 2015 at 7:16:38 PM UTC-5, Kevin Owens wrote: > > Say you have an array > > x = rand(5) > > or just any variable > > y = "abc" > > How would I write a function that I would call like foo(x) and would > return the symbol :x? >