Last active
July 28, 2016 15:50
-
-
Save milktrader/02727d225dffe84ea610e1abd7515a88 to your computer and use it in GitHub Desktop.
using functions as fields in a type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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