On Tue, Jun 12, 2012 at 2:27 PM, Jeff Gray <[email protected]> wrote:
> So, for fun I wrote a PlayingCard class with two instance variables, suit > and > value. > calling collect: [:eachCard | eachCard value] > off topic but also fun is that you can do: collect: [:eachCard | eachCard faceValue ] then you can do: collect: #faceValue. but I don't like that..it feels hackish to me. funny, what if you do collect: #value ? hahahaha > on a collection of cards didn't work as I'd expected, but of course 'value' > is the method on Object that returns self. > > Easily fixed by renaming the 'value' variable to faceValue (and associated > accessors), but made me laugh... > > > > -- > View this message in context: > http://forum.world.st/value-a-trap-for-young-players-tp4634470.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > > -- Mariano http://marianopeck.wordpress.com
