Support iterators returning lent T (#11938)
* lent iterators * rebase tests * update changelog * fix comments, more tests
This commit is contained in:
parent
9ae0dd611f
commit
2b565aad89
7 changed files with 116 additions and 27 deletions
|
|
@ -61,6 +61,11 @@ type
|
|||
|
||||
## Language additions
|
||||
|
||||
- Inline iterators returning `lent T` types are now supported, similarly to iterators returning `var T`:
|
||||
```nim
|
||||
iterator myitems[T](x: openarray[T]): lent T
|
||||
iterator mypairs[T](x: openarray[T]): tuple[idx: int, val: lent T]
|
||||
```
|
||||
|
||||
## Language changes
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue