You are viewing a single comment's thread. Return to all comments →
combination = -> (n) do -> (r) do diff = n - r nfact = (1..n).inject(:*) || 1 rfact = (1..r).inject(:*) || 1 diffact = (1..diff).inject(:*) || 1 nfact/(rfact*diffact) end end
Seems like cookies are disabled on this browser, please enable them to open this website
Partial Applications
You are viewing a single comment's thread. Return to all comments →