(35 lines)
1 '\" t2 .\" Copyright (c) 2026 Bruce Hill3 .\" All rights reserved.4 .\"5 .TH List.counts 3 2026-03-08 "Tomo man-pages"6 .SH NAME7 List.counts \- count occurrences8 .SH LIBRARY9 Tomo Standard Library10 .SH SYNOPSIS11 .nf12 .BI List.counts\ :\ func(list:\ [T]\ ->\ {T=Int})13 .fi14 .SH DESCRIPTION15 Counts the occurrences of each element in the list.18 .SH ARGUMENTS20 .TS21 allbox;22 lb lb lbx23 l l l.24 Name Type Description25 list [T] The list to count elements in.26 .TE27 .SH RETURN28 A table mapping each element to its count.30 .SH EXAMPLES31 .EX32 assert [10, 20, 30, 30, 30].counts() == {10:1, 20:1, 30:3}33 .EE34 .SH SEE ALSO35 .BR Tomo-List (3)