I am new to OCL, and I just came across this expression:
context Person::descendants(): Set
body: result = self.children -> union(
self.children -> collect(c | c.descendants()))
I now that it's trying to obtain the direct and indirect descendants of a person, but how is that written here, what each sentence is trying to say?
Also this one,
context Person::income(): Integer
body: self.job.salary -> sum()
Is this recursive?