Skip to content

Instantly share code, notes, and snippets.

@dtchepak
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dtchepak/11079215 to your computer and use it in GitHub Desktop.
Save dtchepak/11079215 to your computer and use it in GitHub Desktop.
Given:
pure ∷ a → f a
⊛ ∷ f (a → b) → f a → f b
(.) ∷ (b → c) → (a → b) → a → c
show:
pure (.) ⊛ u ⊛ v ⊛ = u ⊛ (v ⊛ w)
=======
LHS:
pure (.)
∷ f ((b → c) -> ((a → b) → a → c))
pure (.) ⊛ u
∷ f ((a → b) → a → c)
pure (.) ⊛ u ⊛ v
∷ f (a → c)
pure (.) ⊛ u ⊛ v ⊛ w
∷ f c
So:
u ∷ f (b → c)
v ∷ f (a → b)
w ∷ f a
RHS:
u ⊛ (v ⊛ w) ∷ f c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment