You can override the `call` function to do just this, but the behaviour is new to 0.4.
On 10 January 2015 at 14:04, Ed Scheinerman <[email protected]> wrote: > I'm working on a type that will have a function-like behavior, so I'd like > to write f(x) to evaluate the function f at x. I could define > getindex(f::MyType,x::Number) so f[x] would behave as desired, but it > would be aesthetically pleasing to be able to type f(x) in this case. Is > there a way to have something like a "function_call" I could define to > make this happen? Or perhaps this already exists in Julia and I just can't > find it. >
