aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-List.has.3
blob: 9310049b4b13f69090ffe6e6502250a40c63046c (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.has 3 2025-09-06 "Tomo man-pages"
.SH NAME
List.has \- check for member
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.has\ :\ func(list:\ [T],\ target:\ T\ ->\ Bool)
.fi
.SH DESCRIPTION
Checks if the list has an element.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx lb
l l l l.
Name	Type	Description	Default
list	[T]	The list to check. 	-
target	T	The element to check for. 	-
.TE
.SH RETURN
`yes` if the list has the element, `no` otherwise.

.SH EXAMPLES
.EX
>> [10, 20, 30].has(20)
= yes
.EE