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
junk by bcharder
28 days ago
tcl by egavilan
37 days ago
tcl by Stu
39 days ago
tcl by Stu
39 days ago
tcl by oldlaptop
73 days ago
tcl by oldlaptop
73 days ago
tcl by Molnija Bjornsson
78 days ago
tcl by Molnija Bjornsson
78 days ago
tcl by zmoment
78 days ago
tcl by zmoment
78 days ago
Submit
New paste
Documentation
From Jabber