Records allow you to efficiently and concisely create anonymous composite values from any existing data. In other words, you can return multiple values from a function without making a model/temporary class for it!!!
What are Patterns or Pattern Matching? Patterns can destructure composite data into its constituents. Patterns are fully type-safe and checked during development. Well, Patterns allow us to conditionally assign parameters simply using if-else.
https://medium.com/google-developer-experts/records-patterns-824447a9f2b1