Skip to content

Fibonacci breakdown

Giorgio Garofalo edited this page Jan 29, 2024 · 3 revisions

Fibonacci

This sample prints the first 20 numbers of the Fibonacci sequence and relies on a custom scheme. Its behavior looks unclear, so let's run the standardize command to adapt it to the default color scheme:

Fib-Standardized

It is still confusing, but decompacting it into blocks via decompact leads us to this:

Fib-1

Tip: standardecompact runs standardized and decompact at the same time.

It's better, now let's change variables colors to help us distinguish them:

Fib-2

At this point, its explanation is simple:

Fib-explanation

Note that this example uses the print function, while since 25/06/2021 it is suggested to use the Print statement.