Combinations with repetitions: Difference between revisions
→{{header|Ruby}}: Fluff up the size calculation example
ReeceGoding (talk | contribs) m (→{{header|R}}) |
(→{{header|Ruby}}: Fluff up the size calculation example) |
||
Line 3,213:
# Extra credit
possible_doughnuts = [*1..
# size returns the size of the enumerator, or nil if it can’t be calculated lazily.
puts "", "#{possible_doughnuts.size} ways to order
</lang>
{{out}}
<pre>
Line 3,226 ⟶ 3,227:
plain and plain
</pre>
=={{header|Rust}}==
<lang rust>
|