Struct / var object (case object)

fusion

adtEnum(Shape):
  String: string
  Circle: tuple[x, y: int, r: int = 1]
  Line: tuple[x1, y1, x2, y2: int]
...
match a:
of Circle as mut circ:
  circ.r = 1000
  echo circ
of String as rect:
  echo rect
of Line as (mut x1, _, x2, _):
  inc x1
  echo a.to(Line)
else: discard

patty

https://github.com/andreaferretti/patty

Expr

No capture

https://github.com/voidpunk/NiMatch

match expr:
  res1 => do1
  ...

Ast

https://github.com/nim-lang/ast-pattern-matching