خرید بک لینک

Vote count: 0

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?

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 25 ارديبهشت 1395 ساعت: 9:28

صفحه بندی