How the Generator Works
top level:
At the most basic level, the generator receives input from the user — functions are selected — and based on that input, outputs an outline for a "fairy" tale.
geek level:
Each function has an array which stores one possible variation of that function per element. When the user hits submit, the computer checks to see which functions have been selected. Then based on that, the computer — applying a set of rules based on Propp's work — randomly picks one element from those function arrays, for each function selected, and concatenates its contents to the output string. It then the value of the textarea box to the output string.
Based on: "Morphology of the Folktale by Vladimir Propp" (University of Texas Press, Austin, Texas, 1968)