v/vlib/arrays
2024-07-24 16:37:20 +03:00
..
arrays.v arrays: fix arrays.fold, when the init value in the call, is an array (#21921) 2024-07-24 16:37:20 +03:00
arrays_fold_test.v arrays: fix arrays.fold, when the init value in the call, is an array (#21921) 2024-07-24 16:37:20 +03:00
arrays_test.v arrays: add arrays.chunk_while/2, where arrays.chunk_while([0,9,2,2,3,2],fn(x int,y int)bool{return x<=y})==[[0,9],[2,2,3],[2]] 2024-07-03 19:05:34 +03:00
index_of.v arrays: add map_of_counts/1, map_of_indexes/1 as well as index_of_first/2, index_of_last/2 utilities (#16618) 2022-12-09 00:37:07 +02:00
map_of.v all: fix typos (#19634) 2023-10-23 21:21:15 +03:00
README.md doc: update trim_doc_node_description, make module readmes more uniform (#20792) 2024-02-12 12:38:47 +02:00
uniq.v arrays: fix off by one error in arrays.uniq_only_repeated/1 and arrays.uniq_all_repeated/1 2023-12-04 15:30:59 +02:00
uniq_test.v arrays: fix off by one error in arrays.uniq_only_repeated/1 and arrays.uniq_all_repeated/1 2023-12-04 15:30:59 +02:00

Description

arrays is a module that provides utility functions to make working with arrays easier.

Examples

import arrays

fn main() {
	a := [1, 5, 7, 0, 9]
	assert arrays.min(a)! == 0
	assert arrays.max(a)! == 9
	assert arrays.idx_min(a)! == 3
}