llm
Download
36 lines 834 BGroffModified 2026-01-20 raw
123456789101112131415161718192021222324252627282930313233343536
'\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH Int.choose 3 2026-01-19 "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
l l l.
Name	Type	Description
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
assert 4.choose(2) == 6
.EE
.SH SEE ALSO
.BR Tomo-Int (3)