Added itrs:tap

This commit is contained in:
Leon Mika 2025-01-30 22:49:19 +11:00
parent e43763eb43
commit cde8922bce
2 changed files with 50 additions and 1 deletions

View file

@ -11,10 +11,19 @@ itrs:from LIST
Returns an iterator which will step through the elements of LIST.
### tap
```
itrs:tap ITR BLOCK
```
Returns an iterator which will execute BLOCK for each element consumed. The elements are consumed from the
iterator ITR. BLOCK will only be executed when the element is consumed.
### to-list
```
lists:to-list ITR
itrs:to-list ITR
```
Consume the elements of the iterator ITR and return the elements as a list.