PatternDispatch.jl
PatternDispatch.jl copied to clipboard
Add Associative pattern
Something like
@pattern f([:x => x::Int, :y => y::Int]) = ...
The rhs of =>
should be a pattern, while the lhs should probably be fixed in advance, or at least computable in some other way. It would be nice to have some syntax like
@pattern f([:x => x::Int, :y => y::Int, rest...]) = ...
to let rest
swamp up the dict entries that were not matched.