Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // https://www.facebook.com/towernter/videos/3166329563380276/
- class Recording {
- /** Creates an instance with the optional reference to previous recordings. */
- constructor(private optional field previous : Recording) {}
- /** sets up the camera and films the person shoring the previous video.*/
- execute():void { ... }
- /** Renders and returns the video of this recording. */
- video():Video { ... }
- }
- function makeRecursiveVideo(optional argument previous : recording) : recording {
- let recording = new Recording(previous);
- recording.execute();
- if(recording.video().length() < 30 seconds) {
- recording = makeRecursiveVideo(recording);
- }
- return recording;
- }
- let recording = makeRecursiveVideo(null);
- display(recording.video())