Factorial in Smalltalk

Example for versions gst 3.1

Smalltalk provides built-in factorial method of class Number, so the example is really simple.

0 to: 16 do: [ :i |
  i display.
  '! = ' display.
  i factorial displayNl
].