factorial entirely without named functions (no [info level] tricks!)
Posted to
tcl
by kbk at Mon May 04 14:04:05 GMT 2009
view raw
puts
[apply {{f args} {tailcall {*}
$f
$f
{*}
$args
}} {apply {{f x} {
if
{
$x
== 0} {
expr
1
}
else
{
expr
{
$x
* [{*}
$f
$f
[
expr
{
$x
- 1}]]}
}
}}} 6]
Recent Posts
tcl by bch
7 hours ago
tcl by Bradipo
9 hours ago
tcl by aspect
10 hours ago
tcl by Bradipo
11 hours ago
tcl by Bradipo
12 hours ago
tcl by Bradipo
12 hours ago
lilypond by Bradipo
1 days ago
tcl by cgm
12 days ago
tcl by dandyn
20 days ago
tcl by Stu
21 days ago
Submit
New paste
Documentation
From Jabber