aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-List.heapify.3
blob: 5f7f47c91957b4c76b9057dc01457660829663d6 (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
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH List.heapify 3 2025-11-29 "Tomo man-pages"
.SH NAME
List.heapify \- convert a list into a heap
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.heapify\ :\ func(list:\ @[T],\ by:\ func(x,y:&T->Int32)\ =\ T.compare\ ->\ Void)
.fi
.SH DESCRIPTION
Converts a list into a heap.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx lb
l l l l.
Name	Type	Description	Default
list	@[T]	The mutable reference to the list to be heapified. 	-
by	func(x,y:&T->Int32)	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 := [30, 10, 20]
my_heap.heapify()
.EE
.SH SEE ALSO
.BR Tomo-List (3)