Created
June 24, 2018 14:30
-
-
Save kennetpostigo/cf39ae996303f69f4a307a52241014d4 to your computer and use it in GitHub Desktop.
Reason BST Blog Post records
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 dog = { | |
name: string, | |
breed: string, | |
age: int | |
}; | |
let myFirstDog = { | |
name: "Bubbly", | |
breed: "Poodle", | |
age: 3 | |
}; | |
/* immutably creates a new record based on myFirst Dog */ | |
let mySecondDog = { ...myFirstDog, year: myFirstDog.year - 1 }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment