⛅ Coming soon: create Unison Cloud clusters in minutes on your own infrastructure. Learn more

Variable patterns

A variable pattern is a regular identifier and matches any expression. The expression that it matches will be bound to that identifier as a variable in the match body.

For example:

match 1 + 1 with
  x -> x + 1