Code from Jerry's presentation on Dick Wall's Parfait pattern