Skip to content

Instantly share code, notes, and snippets.

@Gab-km
Created June 12, 2014 01:59
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 Gab-km/104660ef8fd393b7146b to your computer and use it in GitHub Desktop.
Save Gab-km/104660ef8fd393b7146b to your computer and use it in GitHub Desktop.
namespace FSharp.Monad
type CoYoneda<'U> =
abstract Run: obj -> 'U
type CoYoneda<'F, 'A>(fi: 'F, k: CoYoneda<'A>) = class end
module CoYoneda =
let apply fa k =
CoYoneda(fa, { new CoYoneda<_> with
member this.Run(x) = box x |> k })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment