Skip to content
scrambled
Programming Language Theory Flashcard

What

Books Deckpure-lambda-calculus

Question

What's the difference between the call-by-name fixed-point combinator and the call-by-value fixed-point combinator?

Answer

  • Call-by-name fixed-point combinator - Curry/Y-Combinator:

    Y=λf. (λx. f x x) (λx. f x x)

    -> Used in call-by-name languages because of the lazy evaluation strategy.

    -> Not used in call-by-value languages because it always diverges when applied to a function

  • Call-by-value fixed-point combinator - Z-combinator:

    Z=λf. (λx. f (λv. x x v)) (λx. f (λv. x x v))

    -> Used in call-by-value languages.