Added iterators

Iterators are an unbounded sequence of elements that can only be consumed one-by-one.
This commit is contained in:
Leon Mika 2025-01-30 22:15:38 +11:00
parent badb3b88ba
commit 142abeb990
11 changed files with 614 additions and 62 deletions

20
_docs/mod/itrs.md Normal file
View file

@ -0,0 +1,20 @@
---
---
# Iterator Builtins
### from
```
itrs:from LIST
```
Returns an iterator which will step through the elements of LIST.
### to-list
```
lists:to-list ITR
```
Consume the elements of the iterator ITR and return the elements as a list.