Thanks. So the first question is solved.
On Wednesday, November 18, 2015 at 9:42:26 AM UTC+1, Eric Forgy wrote: > > Try "Function"? > > julia> f(x) = x^2 > f (generic function with 1 method) > > julia> typeof(f) > Function > > > On Wednesday, November 18, 2015 at 4:05:43 PM UTC+8, Sisyphuss wrote: >> >> Hello, everyone, >> >> I'd like to construct a type which contains some functions that I would >> like to give value later (as attributes of instance). >> I define this type as: >> ``` >> type Objective >> f::Any >> g::Any >> end >> ``` >> where `f` is the objective function and `g` is the derivative. >> >> My question is: >> 1) instead of define them as `Any`, is there any other more specific type? >> 2) is there any better design pattern? >> >