Factorial in Shakespeare

Example for versions Lingua::Shakespeare 1.00

This example uses iterative factorial definition. In scene I variables are initialized (except for loop index which is 0 by default), scene II is the loop which prints the current number, characters and the factorial, and then checks whether the current number is 17 — if it is, the loop breaks.

use Lingua::Shakespeare;

Elizabethan Factorial.

Ferdinand, for factorial.
Isabella, for loop index.
Emilia, for exclamation mark.
Sebastian, for space.
Egeus, for equality sign.
Lucio, for newline.

Act I: Factorial calculations.

Scene I: Initialization.

[Enter Isabella and Sebastian]

Isabella:
  You are as fat as the product of a big black furry old cat and a white cow!

[Exit Sebastian]
[Enter Emilia]

Isabella:
  You are as distasteful as the sum of Sebastian and a chihuahua!

[Exit Emilia]
[Enter Egeus]

Isabella:
  You are as good as the difference between the sum of Sebastian and Emilia and a bold brave hero!

[Exit Egeus]
[Enter Lucio]

Isabella:
  You are as cute as the sum of a peaceful warm delicious summer's day and a cute squirrel!

[Exit Lucio]
[Enter Ferdinand]

Isabella:
  You brother!

Scene II: Loop.

Ferdinand:
  Open your heart!

[Exit Ferdinand]
[Enter Emilia]

Isabella:
  Speak your mind!

[Exit Emilia]
[Enter Sebastian]

Isabella:
  Speak your mind!

[Exit Sebastian]
[Enter Egeus]

Isabella:
  Speak your mind!

[Exit Egeus]
[Enter Sebastian]

Isabella:
  Speak your mind!

[Exit Sebastian]
[Enter Ferdinand]

Isabella:
  Open your heart!

[Exit Ferdinand]
[Enter Lucio]

Isabella:
  Speak your mind!

[Exit Lucio]
[Enter Ferdinand]

Ferdinand:
  You are as good as the sum of yourself and a rose.

Isabella:
  You are as gentle as the product of myself and yourself.
  Am I not as beautiful as the sum of your sweet charming lovely noble sister and a flower?

Ferdinand:
  If so, let us return to scene II.

[Exeunt]