Just want to make it absolutely clear - these are only worked examples - they've not been debugged and have known bugs. They're sufficient to get our point across, but _really_ do not try using them in a real system.