DIFF extends CONST with difference expressions:
-(456, 123)Each operand is itself an expression, so they can be nested:
-(2, -(4, 3))That one change introduces recursion throughout the grammar, AST, parser, and evaluator.
For a closer look, read DIFF: When Expressions Contain Expressions.
To try it, you'll need Nix with flakes enabled.
nix develop
elm replThen:
import DIFF.Interpreter as I
I.run "-(456, 123)"
-- Ok (VNumber 333)