Aqua is a small interpreted programming language implemented in Ruby.
- Ruby 3.4 or later
For example, save the following code as factorial.aq.
def f(n) {
if (n == 0) {
1
} else {
n * f(n - 1)
}
}
x = 0
while (x <= 10) {
y = f(x)
x = x + 1
p(y)
}
Then run it like this:
./aqua factorial.aqOutput:
❯ ./aqua factorial.aq
1
1
2
6
24
120
720
5040
40320
362880
3628800
Clone the repository and run it locally.
git clone https://github.com/hashimoto-kei/aqua.git
cd aqua