monte-language / typhon

A virtual machine for Monte.
Other
67 stars 10 forks source link

New methods for Ints: .pick/1 and .choose/1 #127

Open MostAwesomeDude opened 8 years ago

MostAwesomeDude commented 8 years ago

The idea is that these implement the extremely useful (at least in combinatorics and statistics) operators of "pick" and "choose", usually rendered in textbooks as "nPr" and "nCr".

I'm open to better method names; "pick" clashes with .pick/2 on true and false.

justinnoah commented 8 years ago

Why not 'nPr' and 'nCr' as method names?