blob: 3c1804bd6d9009da5ce2b4bbb8f523d8c5a7bc86 (
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.heap_push 3 2025-10-11 "Tomo man-pages"
.SH NAME
List.heap_push \- heap push
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.heap_push\ :\ func(list:\ @[T],\ item:\ T,\ by\ =\ T.compare\ ->\ Void)
.fi
.SH DESCRIPTION
Adds an element to the heap and maintains the heap property. By default, this is a *minimum* heap.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
list @[T] The mutable reference to the heap. -
item T The item to be added. -
by The comparison function used to determine order. If not specified, the default comparison function for the item type will be used. T.compare
.TE
.SH RETURN
Nothing.
.SH EXAMPLES
.EX
my_heap.heap_push(10)
.EE
|