Skip to content

Instantly share code, notes, and snippets.

@chamook
Last active January 19, 2016 21:31
Show Gist options
  • Select an option

  • Save chamook/7463196f606ad55f704a to your computer and use it in GitHub Desktop.

Select an option

Save chamook/7463196f606ad55f704a to your computer and use it in GitHub Desktop.
A super basic example of using interfaces and classes in F#
type ISomeInterface =
abstract DoAnInterfaceyThing : string -> string
type SomeClassThatImplementsAnInterface () =
interface ISomeInterface with
member x.DoAnInterfaceyThing msg =
"Interface!" + msg
member x.DoAClassThing a = a + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment