Help with defining macros

Why would you want to use a macro? The job of macros is to transform expressions before run time.

A function will do the trick.

node!(V::Network, i,v; kwargs...) = push!(V.nodes, Node(;(index=i,value=v,kwargs...)...))
1 Like