blob: a70f7d6a4449a0335a48f07eb18b2be737e39bc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH List.counts 3 2025-04-21T14:44:34.258662 "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 lb
l l l l.
Name Type Description Default
list [T] The list to count elements in. -
.TE
.SH RETURN
A table mapping each element to its count.
.SH EXAMPLES
.EX
>> [10, 20, 30, 30, 30].counts()
= {10=1, 20=1, 30=3}
.EE
|