Programming Language Theory: Difference between revisions

Line 17: Line 17:
C-app ::= C-term C-term</pre>
C-app ::= C-term C-term</pre>
====Fixed-Point Combinators====
====Fixed-Point Combinators====
For a function F, its set of ''fixed points'' are those inputs which map to themselves. The ''fixed-point combinators'' compute the fixed points of their inputs. Curry's ''Y-combinator'' was the first:
For a function F, its set of ''fixed points'' are those inputs which map to themselves. Provided algebraic functions, for instance, fixed points of a function F(x) would be found by setting <i>F(x) = x</i> and solving for the roots. The ''fixed-point combinators'' compute the fixed points of their functional inputs. Curry's ''Y-combinator'' was the first:
* <tt>Y ≡ λf. (λx. f (x x)) (λx. f (x x))</tt> (untyped λ-calculus)
* <tt>Y ≡ λf. (λx. f (x x)) (λx. f (x x))</tt> (untyped λ-calculus)
* <tt>Y ≡ S (K (S I I)) (S (S (K S) K) (K (S I I)))</tt> (SKI calculus)
* <tt>Y ≡ S (K (S I I)) (S (S (K S) K) (K (S I I)))</tt> (SKI calculus)