Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

To 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)

About

DIFF extends CONST with difference expressions whose operands are themselves expressions, introducing recursion throughout the interpreter.

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages