[Newbies] crossSum, an alternative implementation
Markus Gaelli
gaelli at emergent.de
Tue May 9 22:43:43 UTC 2006
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
More information about the Beginners
mailing list