From Babylon to Pascal with Perl 6

From Babylon to Pascal with Perl 6

The first five values are:

There are two possible approaches, specifying the upper limit for a, b and c, or giving a limit for the regular number. The new index pyramid looks like this:

Whenever the program encounters a negative index, it should simply use the positive one – as that gives the correct value. [4] If the row has a middle value (index zero), we remove it from the list we got in [2].

Source: perl6.eu