-
Notifications
You must be signed in to change notification settings - Fork 1
RhoLang
Christian Schladetsch edited this page Mar 10, 2023
·
1 revision
Rho is an in-fix language and reads a lot like Python.
Rho is translated to pi code and uses the same Executor.
// test nested functions and name lookup
fun foo(a)
fun bar(b)
a + b
bar(2)
assert(foo(3) == 5)
// note: we can over-ride variables/functions
fun foo()
1
fun bar(f, n)
n + f()
assert(bar(foo, 1) == 2)
assert(bar(foo, 2) == 3)
// multiple nested functions
fun foo()
fun bar(f, num)
1 + f(num)
fun spam(num)
num + 2
bar(spam, 3)
assert(foo() == 6)
Pyro Documentation. (C) 2023 christian.schladetsch@gmail.com. All Rights Reserved.