You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operators like filter and map take an iterable but return an array. All values of the iterable have to be iterated during evaluation. The following example will run out of memory because ints is an infinite iterable:
Support for generators (including non-terminating ones) has been added in the generators branch.
Edit: Please note that in the initial alpha release, only filter() and take() support generators. Future alpha releases will add generator support to additional operations.
Operators like
filter
andmap
take aniterable
but return anarray
. All values of theiterable
have to be iterated during evaluation. The following example will run out of memory becauseints
is an infiniteiterable
:The same works fine if you use
iterables
as intermediate results like nikic/iter doesThe text was updated successfully, but these errors were encountered: