3 ms·
% isIt3 10 0 6 4 8 0 9 5 I found three ---- proc isIt3 {} { variable 3 [expr {int(rand()*12)}] switch $3
by doublerabbit 7mo ago
% isIt3
10
0
6
4
8
0
9
5
I found three
----
proc isIt3 {} {
variable 3 [expr {int(rand()*12)}]
switch $3 {
3 { puts "I found three" }
default { puts "$3" ; isIt3 }
} ;# end switch
} ;# end proc
The number you're thinking of is 3. (-:
- bitwize 7mo agoSo how well would a candidate do if they looked at that and thought "whoa, is Tcl really tail recursive?!"