recursive factorial - without [tailcall] and $args
Posted to
tcl
by kbk at Mon May 04 14:17:38 GMT 2009
view raw
puts
[apply {{f x} {{*}
$f
$f
$x
}} {apply {{f x} {
if
{
$x
== 0} {
expr
1
}
else
{
expr
{
$x
* [{*}
$f
$f
[
expr
{
$x
- 1}]]}
}
}}} 6]
Recent Posts
tcl by mookie
11 hours ago
tcl by oldlaptop
5 days ago
tcl by rhobart
17 days ago
tcl by rhobart
17 days ago
tcl by rhobart
18 days ago
tcl by Bradipo
18 days ago
tcl by rhobart
18 days ago
tcl by sssc
22 days ago
tcl by mookie
38 days ago
tcl by JMN
46 days ago
Submit
New paste
Documentation
From Jabber