Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 6.9% on proxy.golang.org
Top 7.0% dependent packages on proxy.golang.org
Top 7.0% forks on proxy.golang.org

proxy.golang.org : mtoohey.com/iter/v2

Package iter provides generic, lazy iterators, functions for producing them from primitive types, as well as functions and methods for transforming and consuming them. When reading the documentation of the functions contained in this package, you should assume that any function which accepts an iterator, but does not return one, consumes it unless otherwise stated, meaning that the values contained within cannot be used again. It might seem as though this package's API contains some duplicate functionality, since there are many functions that appear to do the same thing as methods of the same names defined on Iter[T]. However, there is an important difference between these functions and their method counterparts. Since Go does not support type parameters on methods, (Iter[T]).Map can only return Iter[T] (an iterator of the same type as the input iterator). Map does not have this limitation; it can map from an Iter[T] to an Iter[U] (an iterator with a different type than the input iterator). The method versions are still provided even though their functionality is a strict subset of that of the function versions because using methods when possible results in more readable code.

Registry - Source - Documentation - JSON
purl: pkg:golang/mtoohey.com/iter/v2
Keywords: generic, generics, go, golang, iterator, lazy
License: BSD-3-Clause
Latest release: 12 months ago
First release: over 1 year ago
Namespace: mtoohey.com/iter
Dependent packages: 1
Stars: 27 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 17 days ago

    Loading...
    Readme
    Loading...