Skip to content

Instantly share code, notes, and snippets.

@MattMSumner
Last active January 20, 2016 00:24
Show Gist options
  • Save MattMSumner/0d8394709e024da73b21 to your computer and use it in GitHub Desktop.
Save MattMSumner/0d8394709e024da73b21 to your computer and use it in GitHub Desktop.

A function describes a relationship between two sets, a set of inputs and outputs.

Combinators

  1. λx.xxx - YES
  2. λxy.zx - NO
  3. λxyz.xy(zx) - YES
  4. λxyz.xy(zxy) - YES
  5. λxy.xy(zxy) - NO

Normal form or diverge?

  1. λx.xxx - Normal
  2. (λz.zz)(λy.yy) - Diverge
  3. (λx.xxx)z - Normal

Beta reduce

  1. (λabc.cba)zz(λwv.w) - z
  2. (λx.λy.xyy)(λa.a)b - bb
  3. (λy.y)(λx.xx)(λz.zq) - qq
  4. (λz.z)(λz.zz)(λz.zy) - yy
  5. (λx.λy.xyy)(λy.y)y - yy
  6. (λa.aa)(λb.ba)c - aac
  7. (λxyz.xz(yz))(λx.z)(λx.a) - λz.za - λz1.za
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment