Skip to content

Instantly share code, notes, and snippets.

@kunjee17
Created October 28, 2019 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunjee17/a1b72ff0c04decc434186075ced8322c to your computer and use it in GitHub Desktop.
Save kunjee17/a1b72ff0c04decc434186075ced8322c to your computer and use it in GitHub Desktop.
Person in F#
type Person(firstName:string, lastName: string) =
let firstName = firstName
let lastName = lastName
let calculateFullName() =
firstName + " " + lastName
member x.FirstName with get() = firstName
member x.LastName with get() = lastName
member x.FullName with get() = calculateFullName()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment