docs: fix doc comments in arrays too

This commit is contained in:
Delyan Angelov 2025-07-02 17:06:21 +03:00
parent 74b6e3b5c7
commit 35af6a8d12
7 changed files with 49 additions and 59 deletions

View file

@ -1,15 +1,15 @@
module arrays
// ReverseIterator provides a convenient way to iterate in reverse over all elements of an array,
// without making allocations, using this syntax: `for elem in arrays.reverse_iterator(a) {` .
// ReverseIterator provides a convenient way to iterate in reverse over all elements of an array without allocations.
// I.e. it allows you to use this syntax: `for elem in arrays.reverse_iterator(a) {` .
pub struct ReverseIterator[T] {
mut:
a []T
i int
}
// reverse_iterator can be used to iterate over the elements in an array using this syntax:
// `for elem in arrays.reverse_iterator(a) {` .
// reverse_iterator can be used to iterate over the elements in an array.
// i.e. you can use this syntax: `for elem in arrays.reverse_iterator(a) {` .
pub fn reverse_iterator[T](a []T) ReverseIterator[T] {
return ReverseIterator[T]{
a: a