import "io" let twotimes(x) be { let prev; if x = 0 then resultis 0; prev := twotimes(x-1); resultis prev+2 } /* The point of this program is that it will use just as much stack memory as I want. Whatever the value of a is, it will use just over 5*a words of stack space */ let start() be { let a, b; a := 500; b := twotimes(a); out("twotimes(%d) = %d\n", a, b) }