>
> Pkg.clone("https://github.com/Jeffrey-Sarnoff/Delegate.jl")
> using Delegate
import <, <=, +, *
immutable AnInt
val::Int
end
int1 = AnInt(1)
int2 = AnInt(2)
@delegate_1field2vars AnInt.val [ (<), (<=) ]; # plain results
@traject_1field2vars( MyInt, val, [ (+), (-), (*) ] ); # type re-wrapped
> results
int1 < int2
true
int1 + int2
AnInt(3)
Also exports 2field versions and 1var versions.
More examples are available in the README.md and in the tests.
This is built on the work of John Myles White and Toivo Hennigsson.