Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

TCL is a better Scheme

Name: Anonymous 2016-05-10 23:02

This is a tail-recursive naive implementation of factorial for TCL 8.6:
proc fac-tr {n {k 1}} {
if {$n <= 1} {
return $k
} else {
tailcall fac-tr [- $n 1] [* $n $k]
}
}

Name: Anonymous 2016-05-11 1:43

>>4
This is a common /prog/ troll. Don't take it too seriously.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List