Implement n choose k function.