KAI

Rho Rho

Build status CodeFactor License Release

Rho is an in-fix language that translates to Pi.

Both Rho and Pi use the same Executor.

Rho is much like Python, but with an even less verbose syntax.

The ‘return value’ for a Rho function (continuation) is whatever is left on the stack(s) when the continuatin leaves.

Rho is internally translated to Pi for use in a single Executor that supports continuations natively.

Hello World

rho> print("Hello, world")
Hello, world
rho>

Example Test Suite

This is code taken directly from a file in the test suite:

fun a(b, c)
	b + c

assert a(1, 2) == 3

fun d(e)
	fun f(g)
		g*2
	f(e)
  
assert d(2) == 4
assert exists a
assert exists d
assert !(exists f)

fun h(i,j,k)
	a(i, d(j)*k)

assert h(1,2,3) == 16