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
lilypond by Bradipo
20 hours ago
tcl by cgm
11 days ago
tcl by dandyn
19 days ago
tcl by Stu
20 days ago
tcl by dandyn
22 days ago
tcl by Stu
25 days ago
tcl by philbr-t
30 days ago
tcl by arjen
32 days ago
tcl by brain
38 days ago
tcl by mjanssen
40 days ago
Submit
New paste
Documentation
From Jabber