Skip to content

Instantly share code, notes, and snippets.

@seankearon
Forked from robertpi/gist:2964793
Created August 31, 2017 07:29
Show Gist options
  • Save seankearon/de261ac578de1a735b26f23b0ce78155 to your computer and use it in GitHub Desktop.
Save seankearon/de261ac578de1a735b26f23b0ce78155 to your computer and use it in GitHub Desktop.
F# record implementing an interface
namespace MyNamespace
type IMyInterface =
abstract GetValue: unit -> string
type MyRecord =
{ MyField1: int
MyField2: string }
interface IMyInterface with
member x.GetValue() = x.MyField2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment