Am 09.05.2006 um 16:46 schrieb Ron Teitelbaum:

Integer>> crossSum
        "return to the sender the sum of each decimal digit of self"
        ^self asString detectSum: [:a | a asString asInteger]

Mind that
        
        a digitValue

would be a better alternative to
        
        a asString asInteger

- Bert -

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

Reply via email to