Skip to content

Instantly share code, notes, and snippets.

View SchlenkR's full-sized avatar

SchlenkR SchlenkR

View GitHub Profile
type 'a Foo = Foo of 'a
module Foo =
let ofValue (a : 'a) : 'a Foo = Foo a
let apply (a : 'a Foo) (f : ('a -> 'b) Foo) : 'b Foo =
let (Foo f) = f
let (Foo a) = a
Foo (f a)