Sign in
third-party-mirror
/
orbit
/
301094089f7066c20f6885ee60d316d3f550a3c2
/
.
/
qt-everywhere-src-5.14.1
/
qtdeclarative
/
tests
/
manual
/
v4
/
fun.3.js
blob: 5add270f3567117c5ce103c1720b0dc21690198e [
file
] [
log
] [
blame
]
function
fix
(
f
)
{
var
k
=
function
(
x
)
{
return
f
(
function
(
z
)
{
return
x
(
x
)(
z
)
})
}
return
k
(
k
)
}
var
F
=
function
(
f
)
{
return
function
(
n
)
{
return
n
==
0
?
1
:
n
*
f
(
n
-
1
)
}
}
var
fact
=
fix
(
F
)
print
(
"the factorial of 12 is"
,
fact
(
12
))