Y combinator: Difference between revisions
m
→{{header|Dhall}}: Tidied a minor typo.
m (→{{header|Dhall}}: Tidied a minor typo.) |
|||
Line 2,124:
=={{header|Dhall}}==
Dhall is not a turing complete language, so there's no way to implement the real Y combinator. That being said, you can replicate the effects of the Y combinator to any arbitrary but finite recursion depth using the builtin function Natural/Fold, which acts as a bounded fixed-point combinator that takes a natural argument to describe how
Here's an example using Natural/Fold to define recursive definitions of fibonacci and factorial:
|