Instructions

ConvergeArgs.InstructionType
Instruction(reqs, f)

Saves instructions for building a value using the given function f and inputs reqs. Use the @instr macro to save some typing.

Examples

julia> instr = Instruction([[:ω]], ω->2π/ω)
Instruction([[:ω]], var"#3#4"())
ConvergeArgs.@instrMacro
@instr (args...)->body

Make an Instruction from the given function. Arguments can make use of dotted notation to access nested fields.

Examples

julia> in1 = @instr ω->2π/ω  # single-argument instruction
Instruction([[:ω]], var"#3#4"())

julia> in2 = @instr (T,periods)->T*periods  # multiple arguments
Instruction([[:T], [:periods]], var"#5#6"())

julia> in3 = @instr [solv_args.delta_t,t_max]->t_max/solv_args.delta_t
Instruction([[:solv_args, :delta_t], [:t_max]], var"#7#8"())