Created
October 28, 2019 03:50
-
-
Save kunjee17/a1b72ff0c04decc434186075ced8322c to your computer and use it in GitHub Desktop.
Person in F#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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