7 lines
309 B
Smalltalk
7 lines
309 B
Smalltalk
|
accessing
|
||
|
newestOf: userId
|
||
|
|
||
|
self messages ifNil: [ ^ nil ].
|
||
|
self messages ifEmpty: [ ^ nil ].
|
||
|
^ ((self select: [ :tweet | tweet authorId = userId ])
|
||
|
select: [ :tweet | tweet created = (((self select: [ :each | each authorId = userId ]) collect: [ :each | each created ]) asSortedCollection last)]) first
|