Skip to content

Instantly share code, notes, and snippets.

@milktrader
Last active July 28, 2016 15:50
Show Gist options
  • Save milktrader/02727d225dffe84ea610e1abd7515a88 to your computer and use it in GitHub Desktop.
Save milktrader/02727d225dffe84ea610e1abd7515a88 to your computer and use it in GitHub Desktop.
using functions as fields in a type
type Foo
f::Function
end
bar = Foo(x->2x)
bar.f(2)
4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment