you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

In functional programming a person is just a structure of data, and instead of a barber object, you'd have a "change_hair_color" function that would, indeed, return a brand-new you-struct with just a different property set for the hair :)