Skip to content

Instantly share code, notes, and snippets.

@kennetpostigo
Created June 24, 2018 14:30
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 kennetpostigo/cf39ae996303f69f4a307a52241014d4 to your computer and use it in GitHub Desktop.
Save kennetpostigo/cf39ae996303f69f4a307a52241014d4 to your computer and use it in GitHub Desktop.
Reason BST Blog Post records
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