Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 615 Bytes

README.md

File metadata and controls

35 lines (23 loc) · 615 Bytes

DIFF

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.

Try it

You'll need Nix with flakes enabled.

nix develop
elm repl

Then:

import DIFF.Interpreter as I

I.run "-(456, 123)"
-- Ok (VNumber 333)