82e74cb55f
An empty `Value` is now valid. It is now possibly to change the edgeVal of an OpenEdge. It feels like this shouldn't be necessary, but it greatly simplifies the decoding logic to have this. A tuple which is created with just one input edge, and with no edge value of its own, is now automatically simplified to just that input edge. |
||
---|---|---|
gg | ||
gim | ||
sandbox | ||
.gitignore | ||
go.mod | ||
go.sum | ||
README.md |
Ginger
Fibonacci function in ginger:
fib {
decr { out add(in, -1) }
out {
n 0(in),
a 1(in),
b 2(in),
out if(
zero?(n),
a,
recur(decr(n), b, add(a,b))
)
}(in, 0, 1)
}
Usage of the function to generate the 6th fibonnaci number:
fib(5)