- Install Racket.
- Build from the source code.
$ git clone https://github.com/umatani/tiny-opalclj.git $ cd tiny-opalclj $ raco pkg install
-
Create a TJ source file.
#lang tiny-opalclj #eval eval-abs class A { int f(int a) { return a + 1; } }
-
requirethe source from REPL. -
To execute a method concretely, invoke it from REPL (
selfis set to a dummy object).> (A$f 100) -
To interpret a method abstractly, specify a default parameter value for that method in the source and
requireit again.#lang tiny-opalclj #eval eval-abs class A { int f(int a = 3) { return a + 1; } }