Hi,

I have a situation where a number of functions differ so little that it 
would make sense to define them by a loop. 
I don't know if I am using the correct jargon, but here is a small example 
to illustrate:

type test
        A::Int
        B::Int
end

function A(T::test)
        T.A
end

function B(T::test)
        T.B
end


If possible, I would like to define the functions A and B along these lines:

for letter in [A,B]
        function letter(T::Test)
                T.letter
        end
end


Thanks,

Robert

Reply via email to