Factorial in Scratch
This example uses recursive method of factorial calculation. Snap! allows to create user-defined blocks, in this case
factorial block of type reporter (a block that returns a value, i.e. a function block). The newly defined block appears in the blocks palette immediately, and can be used when editing its own definition, thus allowing recursive calls.
Factorial (recursive) in Snap!