Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composable iterators #22

Open
strega-nil opened this issue Nov 20, 2017 · 4 comments
Open

Composable iterators #22

strega-nil opened this issue Nov 20, 2017 · 4 comments

Comments

@strega-nil
Copy link

related to #20

@strega-nil
Copy link
Author

What I'd like to be able to do:

let arr =
  iter(arr)
  |> Iter.enumerate
  |> Iter.map(((n, x)) => x + n)
  |> Array.from_iter;

@kavorite
Copy link

https://github.com/rizo/iter/ seems to have a lot of what you need; I'm leery of interoperability with existing implementations and standard API but enough love and it should be workable

it would certainly be nice to see something closer to the core of the ecosystem, but it seems polished, and as I work more to leverage OPAM I'm finding this 'fragmentation' of community-developed tooling and libraries to be pretty pervasive, but the products to be extremely useful; the general feel is that the standard isn't moving fast enough or breaking enough things, so to compensate, people have adopted innovative features from other languages and invented new solutions, which I see as a reaffirmation of the power of the ML core and the fact that software developers are just humans taking care of their needs, with the werewithal to put some thought into maybe taking care of ours

truly inspiring to see a suite of tools as powerful as OCaml for abstraction over not-so-sexy things in not-so-sexy ways that actually has a pulse

@rauschma
Copy link

Ideally, this would work with both JS code and be truly functional at the same time. Not sure that’s possible, though – it’s a tall order.

@ckknight
Copy link

ckknight commented Dec 1, 2017

It'd be nice if there were some way to convert a JS object that has a well-implemented [Symbol.iterator] method and convert that into a well-typed value that is easy-to-use from ReasonML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants