aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-List.unique.3
blob: 1c203a621880841874c12a6310ee7dd4c1179af5 (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
35
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH List.unique 3 2025-11-29 "Tomo man-pages"
.SH NAME
List.unique \- get the unique items in a list
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.unique\ :\ func(list:\ [T]\ ->\ {T})
.fi
.SH DESCRIPTION
Returns a set of the unique elements of the list.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx lb
l l l l.
Name	Type	Description	Default
list	[T]	The list to process. 	-
.TE
.SH RETURN
A set of the unique elements from the list.

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