Re: [julia-users] Parameteric Function of Types

2016-10-28 Thread Isaiah Norton
On Fri, Oct 28, 2016 at 12:07 PM, Derek Gaston wrote: > I can't quite seem to get the right syntax for creating methods that are > keyed off of subtypes (as a parameter). > > Say I have: > > abstract foo > abstract bar <: foo > > I want to create a function that is like so: >

[julia-users] Parameteric Function of Types

2016-10-28 Thread Derek Gaston
I can't quite seem to get the right syntax for creating methods that are keyed off of subtypes (as a parameter). Say I have: abstract foo abstract bar <: foo I want to create a function that is like so: function doStuff(::Type{foo}) end in such a way that I can call it with "Type{bar}".