Test programs

The interpreter uses the following startup environment:
{ x: 5, y: 6 }
Sample 1:Integer literal
Sample 2:Variable
Sample 3:Primitive applications
Sample 4:Closure (constant function)
Sample 5:Closure (ident. function)
Sample 6:Closure (free variable)
Sample 7:Apply constant function
Sample 8:Apply ident. function
Sample 9:Apply function with free var.
Sample 10:Apply the square function
Sample 11:Higher-order fn: Apply twice
Sample 12:Higher-order fn: Compose

Interpreter

Enter the program you want to interpret below:





Output of the interpreter: