Verse Calculus Playground

The rewrite rules of Augustsson et al., ICFP 2023 as an interpreter, running in your browser (Haskell → WebAssembly).
Syntax cheat-sheet
exists x y. e     ∃x y. e          x := e; rest      f(x) := e; rest     f(x, y) := e; rest
\x. e             λx. e            \(x, y). e        (e1, e2)  ()  (e,)  ⟨e1, e2⟩
e1 | e2  (choice) e1; e2           e1 = e2           + - *  div(a,b) mod(a,b)   > < >= <= /=   int(e)   f(e)  t(i)
fail  one{e}  all{e}  {e}          if (c) then a else b        for (g) do e       split{e}(f, g)
precedence:  ;  <  |  <  =  <  comparisons  <  + -  <  *  <  application;   λ ∃ := scope as far right as possible
literals: 42  -3  'Nil  'Cons (atoms: tags that only unify with themselves)  "text"
library:  head tail cons append flatMap map filter find some zip   foldl length sum reverse take drop range member
comments: -- line   {- block -}
Loading the WebAssembly module…