Skip to content

Instantly share code, notes, and snippets.

@WillNess
Last active July 15, 2016 21:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WillNess/5016202 to your computer and use it in GitHub Desktop.
Save WillNess/5016202 to your computer and use it in GitHub Desktop.
B is simply defined as
B f g x = f (g x)
When we supply it with two args,
it still needs the third. (B f g) needs one more argument.
Let's see what is B B B. It supplies two args to the first B,
so we need to add the third there:
B B B f = B (B f)
and so we need two more:
B B B f g x = B (B f) g x
= (B f) (g x)
= B f (g x)
and so there's need for one more argument,
B B B f g x y = B f (g x) y
= f (g x y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment