Mastodon

One may have their doubt about its capability of calculation; it can at least perform simple arithmetic operations and looping. This program calculates the n-th number in the Fibonacci sequence (starting from 1 with fib(1) = 1 and fib(2) = 1) with the input n set to be the number of a in the initial fact pool:

a, _calc ==> _add;

cnt2, _add ==> cnt2_1, cnt2_2, _add;
cnt1, _add ==> cnt3, _add;
cnt2_1, _add ==> cnt3, _add;
_add ==> _move;

cnt2_2, _move ==> cnt1, _move;
cnt3, _move ==> cnt2, _move;
a, _move ==> a, _calc;
_move ==> _coalesc;

cnt1, _coalesc ==> res, _coalesc;
_coalesc ==> ;

// calculate fib(8)
[ a:8, cnt2, _calc ]