Skip to content

Instantly share code, notes, and snippets.

@akhileshs
Created December 11, 2015 18:56
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 akhileshs/efdc4e22ce9cfa32c1be to your computer and use it in GitHub Desktop.
Save akhileshs/efdc4e22ce9cfa32c1be to your computer and use it in GitHub Desktop.
scala> case class B[F, T](c: B[F, T] => (F => T)) extends (B[F, T] => (F => T)) {
| def apply(b: B[F, T]) = c(b);
| }
defined class B
scala> def Y[F, T] = (f: (F => T) => F => T) =>
| B[F, T](x => f(x(x)(_)))(B(x => f(x(x)(_))))
Y: [F, T]=> ((F => T) => (F => T)) => (F => T)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment