'\" t .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" .TH Int.choose 3 2025-09-06 "Tomo man-pages" .SH NAME Int.choose \- binomial coefficient .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf .BI Int.choose\ :\ func(n:\ Int,\ k:\ Int\ ->\ Int) .fi .SH DESCRIPTION Computes the binomial coefficient of the given numbers (the equivalent of `n` choose `k` in combinatorics). This is equal to `n.factorial()/(k.factorial() * (n-k).factorial())`. .SH ARGUMENTS .TS allbox; lb lb lbx lb l l l l. Name Type Description Default n Int The number of things to choose from. - k Int The number of things to be chosen. - .TE .SH RETURN The binomial coefficient, equivalent to the number of ways to uniquely choose `k` objects from among `n` objects, ignoring order. .SH EXAMPLES .EX >> (4).choose(2) = 6 .EE