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

does iter need of_seq #30

Open
nilsbecker opened this issue Apr 27, 2020 · 4 comments
Open

does iter need of_seq #30

nilsbecker opened this issue Apr 27, 2020 · 4 comments

Comments

@nilsbecker
Copy link

to allow conversion from the stdlib generator?

@Drup
Copy link
Collaborator

Drup commented Apr 27, 2020

Well, sure, but you need inversion of control (like algebraic effects or delimcc) to write such a function, and it's terribly slow.

It's one of those function that, when you need it, you probably should figure out a way not to. :)

@c-cube
Copy link
Owner

c-cube commented Apr 27, 2020

of_seq is easy, it's to_seq that'd be hard.

@Drup
Copy link
Collaborator

Drup commented Apr 27, 2020

Oh, I misread! Yes, of_seq is easy and pretty useful, I suppose. Although in most cases it's better to cut off the middlemen.

@nilsbecker
Copy link
Author

hm. in the current context i was using gen and Iter.of_gen before and was moving from gen to Stdlib.Seq. i then noticed that there is no equivalent of_seq. in the meantime i figured out how to do it with OSeq.iter. i did not really think about efficiency at all at the moment. am i doing it wrong^TM ?

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

3 participants