>>>>> "John" == John Toohey <j...@parspro.com> writes:

John> Thank you, duly chastened. I did know the formulae for P and C, but didn't
John> know how to add the repetitions. My original code was :-
John> |c|
John> c := SortedCollection new.
John> c add: '0, 0'; add:'1, 1'; add: '2, 2'; add:'3, 3'; add: '4, 4'.
John> (0 to: 4) combinations: 2 atATimeDo:[:each | c add: each asCommaString.  c
John> add:( each reverse) asCommaString].

"Every time I cut with this wide saw, it removes 1/2 inch from the wood!
I'll just glue it back after the cuts!"

"why don't you just use the laser cutter?  no losses!"

:-)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to