mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
docs: fix doc comments in arrays
too
This commit is contained in:
parent
74b6e3b5c7
commit
35af6a8d12
7 changed files with 49 additions and 59 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue