1e30ad6959
`gg.Graph` has been reworked in its internal functionality, to more closely match the capability of a purely stack-based implementation. The current implementation is _very_ inefficient, however. Tests have been deliberately left pretty sparse, as I expect the internals to continue to change significantly. |
||
---|---|---|
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)