Skip to content

Instantly share code, notes, and snippets.

@dadhi
Last active December 28, 2017 08:08
Show Gist options
  • Select an option

  • Save dadhi/05990a89f6881996bfced6a05e560231 to your computer and use it in GitHub Desktop.

Select an option

Save dadhi/05990a89f6881996bfced6a05e560231 to your computer and use it in GitHub Desktop.
C# Cofree experiments from John De Goes talk https://www.youtube.com/watch?v=R_nYc4FItcI
using System;
namespace FP
{
// final case class Cofree[F[_], A](head: A, tail: F[Cofree[F, A]])
public interface ICofree<F, _, A>
{
A Head { get; }
CofreeF Tail<CofreeF>() where CofreeF : ICofree<F, _, A>;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment