Go to file
Brian Picciano 1e30ad6959 Strip out most of the functionality of gg.Graph
`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.
2021-12-27 10:11:07 -07:00
gg Strip out most of the functionality of gg.Graph 2021-12-27 10:11:07 -07:00
gim rename Junction to Tuple, update syntax, rename Null to ZeroGraph 2021-08-26 21:26:24 -06:00
sandbox rename Junction to Tuple, update syntax, rename Null to ZeroGraph 2021-08-26 21:26:24 -06:00
.gitignore gitignore 2016-08-07 09:06:36 -06:00
go.mod make into a module 2021-08-26 21:27:47 -06:00
go.sum make into a module 2021-08-26 21:27:47 -06:00
README.md Remove a bunch of old code, update the README 2021-08-26 21:25:39 -06:00

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)