14 lines
401 B
Plaintext
14 lines
401 B
Plaintext
fcn teleprompter(options){
|
|
os:=T("exit").extend(vm.arglist); N:=os.len();
|
|
if(N==1) return("");
|
|
while(1){
|
|
Utils.zipWith(fcn(n,o){"%d) %s".fmt(n,o).println()},[0..],os);
|
|
a:=ask("Your choice: ");
|
|
try{ n:=a.toInt(); if(0<=n<N) return(os[n]); } catch{}
|
|
println("Ack, not good");
|
|
}
|
|
}
|
|
|
|
teleprompter("fee fie" , "huff and puff" , "mirror mirror" , "tick tock")
|
|
.println();
|