Markus,

That is beautiful!  I started to do something similar but was trying to
increase the size of the mod and it was dependent on the number of digits so
I had to do a string conversion anyway.  You did a very nice job!

Ron

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:beginners-
> [EMAIL PROTECTED] On Behalf Of Markus Gaelli
> Sent: Tuesday, May 09, 2006 6:44 PM
> To: [email protected]
> Subject: [Newbies] crossSum, an alternative implementation
> 
> Hi all,
> 
> I just subscribed to the list and found that crossSum debate in the
> archives.
> I did an implementation a while ago for musinum, a fractal music
> generator, that can be found on squeakmap.
> (for a "professional implementation see also http://reglos.de/musinum )
> 
> I did it this way:
> 
> Integer >> crossSumBase: aBase
>       self < aBase
>               ifTrue: [^ self].
>       ^ self \\ aBase
>               + (self // aBase crossSumBase: aBase)
> 
> Cheers,
> 
> Markus
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to