"In its two-argument form, with positive arguments, !! tells you how many different ways there are of selecting the number of items specified on the left from the population of items specified on the right. The order of items in each pair is ignored. So if the population of four consisted of the letters A B C D, the 6 possible combinations of 2 letters would be: AB AC AD BC BD CD. The combination BA would be regarded as the same as AB."
| table1 table2 result |
"Number of unique pairs from a population of 4"
self assert: 6 asApl = (2 asApl aplBinominal:4).
"Number of groups of three from a population of 20"
self assert: 1140 asApl = (3 asApl aplBinominal:20).
"Number of pairs from a population of 6 12 20 respectively"
self assert: #(15 66 190) asApl = (2 asApl aplBinominal:#(6 12 20)).