mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-26 14:54:17 +00:00
Estimated hours taken: 1
Add unification expressions, written `X @ Y', to the language.
`X @ Y' unifies X and Y and returns the result. Unification
expressions can make switches more compact.
library/ops.m:
Add the operator `@'.
compiler/make_hlds.m:
Expand unification expressions.
NEWS:
doc/reference_manual.texi:
w3/news/newsdb.inc:
Document the new syntax.
tests/hard_coded/Mmakefile:
tests/hard_coded/unify_expression.{m,exp}:
Test case.
2 lines
8 B
Plaintext
2 lines
8 B
Plaintext
f(1, 2)
|