In Scala, we can match as follows
scala> val a = 1
scala> 2 match {
case a => 1
case 2 => 2
}
>>> 2
But does Match only support literal matching? Or is it the bad way I use it
julia> @match 2 begin
a => 1
2 => 2
end
>>>1
What should I do when I want to match a variable on the type? Thank you for your help