blob: 80154a3ab0363b4dd553d9fca2457d46bdd5912a (
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
36
37
38
39
40
|
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Table.without 3 2025-11-29 "Tomo man-pages"
.SH NAME
Table.without \- return a table without key/value pairs in another table
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Table.without\ :\ func(t:\ {K:V},\ other:\ {K:V}\ ->\ {K:V})
.fi
.SH DESCRIPTION
Return a copy of a table, but without any of the exact key/value pairs found in the other table.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx
l l l.
Name Type Description
t {K:V} The base table.
other {K:V} The other table whose key/value pairs will be omitted.
.TE
.SH RETURN
The original table, but without the key/value pairs from the other table.
.SH NOTES
Only exact key/value pairs will be discarded. Keys with a non-matching value will be kept.
.SH EXAMPLES
.EX
t := {"A": 1; "B": 2, "C": 3}
assert t.without({"B": 2, "C": 30, "D": 40}) == {"A": 1, "C": 3}
.EE
.SH SEE ALSO
.BR Tomo-Table (3)
|