I have an object Person, this object goes through millions of unique transformations and these transformations have to be done in order, sequentially.
Traditionally, I can do this:
var bob = new Person()
birth(bob)
oneYearOld(bob)
middleSchool(bob)
highSchool(bob)
// ...million more transformations
So my questions are, how can I do it functionally (no side effects/pure function) in Scala? And if I use val bob, will I be creating millions of copies of bob which may lead to memory issues?
