Skip to content

Instantly share code, notes, and snippets.

@milktrader
Created March 6, 2015 18:28
Show Gist options
  • Save milktrader/3ef19c846a4c85fa1572 to your computer and use it in GitHub Desktop.
Save milktrader/3ef19c846a4c85fa1572 to your computer and use it in GitHub Desktop.
type factories
julia> LIST = ["foo", "bar"]
2-element Array{ASCIIString,1}:
"foo"
"bar"
julia> for L in LIST
@eval begin
type ($L)
end
end
end
ERROR: syntax: invalid type signature
in anonymous at no file
@milktrader
Copy link
Author

LIST = [:Foo, :Bar]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment