llm
Download
35 lines 609 BGroffModified 2026-03-09 raw
1234567891011121314151617181920212223242526272829303132333435
'\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH List.counts 3 2026-03-08 "Tomo man-pages"
.SH NAME
List.counts \- count occurrences
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.counts\ :\ func(list:\ [T]\ ->\ {T=Int})
.fi
.SH DESCRIPTION
Counts the occurrences of each element in the list.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx
l l l.
Name	Type	Description
list	[T]	The list to count elements in. 
.TE
.SH RETURN
A table mapping each element to its count.

.SH EXAMPLES
.EX
assert [10, 20, 30, 30, 30].counts() == {10:1, 20:1, 30:3}
.EE
.SH SEE ALSO
.BR Tomo-List (3)