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 iobates
11 days ago
tcl by iobates
11 days ago
tcl by iobates
11 days ago
tcl by FLORENTIS
15 days ago
tcl by Florentis
15 days ago
tcl by schelte
21 days ago
tcl by iobates
21 days ago
tcl by cgm
22 days ago
tcl by iobates
26 days ago
tcl by FM
30 days ago
Submit
New paste
Documentation
From Jabber