Сравните язык объектных ограничений - Object Constraint Language (OCL) и работу с коллекциями в Smalltalk:
OCL:Company.allInstances->collect(employees->size)Smalltalk:
Company allInstances collect: [:each | each employees size]OCL:
Contact.allInstances->firstSmalltalk:
Contact allInstances firstOCL:
Company.allInstances->first.employees->includes(self)Smalltalk:
Company allInstances first employees includes: selfOCL:
Category.allInstances->select(name = 'business')->notEmptySmalltalk:
(Category allInstances select: [:each| each name = 'business']) notEmptyOCL:
Company.allInstances->reject(employees->size = 1)Smalltalk:
Company allInstances reject: [:each| each employees size = 1]