I got recursion working in #Funktal, and now I can write this fixedpoint factorial:
-- the fixedpoint function
functions {
fix = (\f. f f apply )
}
main {
5
`(\ n <- f .
`(1)
`( n n 1 - f f apply * )
n 1 ==
if
) fix print
}
This actually works, even if it is still a bit rough around the edges.
@wim_v12e Oh, that is cool. Could you make me a rom of this one? I'd love to run it through beetbug