On Wed, 2007-06-06 at 16:54 +0200, Paolo Bonzini wrote:
> You did realize that this is also subsuming
> 
>      do: aBlock [ aBlock value: self ]
> 
> didn't you? :-P

Indeed, it is the ultimate reduction of the principle initially
presented by Object>>#do:.

Though one might moreover expect

| arrayResult |
arrayResult := aMessage sendTo: {self}.
(arrayResult isArray and: [arrayResult size = 1])
    ifTrue: [arrayResult first]
    ifFalse: [arrayResult]

-- 
;;; Stephen Compall ** http://scompall.nocandysw.com/blog **
Failure to imagine vast possibilities usually stems from a lack of
imagination, not a lack of possibility.

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to