[Newbies] Adding method to Smallinteger class
Bert Freudenberg
bert at freudenbergs.de
Fri Apr 23 21:39:08 UTC 2010
On 23.04.2010, at 23:19, Herbert König wrote:
>
> Hi Randal,
>
>
> RLS> larger: anInteger
> RLS> ^self max: anInteger
> RLS> Code re-use, bay-bee.
>
> true but couldn't resist to throw blocks at a newbie myself :-))
Sure, but two blocks are just too scary ;)
Much more fun to figure out why this works:
larger: anInteger
anInteger > self ifTrue: [^ anInteger]
- Bert -
More information about the Beginners
mailing list