-
Notifications
You must be signed in to change notification settings - Fork 171
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
Implement Enumerable Module with Enumerator Class #342
Comments
Hint: * means if no block given, then returns the Enumerator itself Method list implementation:
|
@Maxwell-Alexius Are you still interested in working on this? |
I'm not sure I can handle this ton of works and I haven't been using Ruby for a long time since working on JS related things, it might take me time to pick up and inspect the I would prefer others can pick up this issue and build the main Enumerator class. If the main class is built, I think I can assist in implementing the |
Seeing Maxwell's recent comment, I've been surveying around Enumerator in Ruby and Goby, and I built a very primitive Enumerator class as a mock on my local rep that can be compiled so far. I think it is possible to build. But now I'm wondering how to proceed farther. In other words, I think we need a grand design around organizing Enumerator and Enumerable (and perhaps Lazy and Block) classes in Goby.
This is just a draft memorandum and is not final. If needed, I create a new issue for that. Thank you, |
@hachi8833 sorry for the late response
And from the screenshot, you uploaded your implementation looks cool! Can you open a PR for it? |
@st1102 thank you for the checking! I'd send the WIP PR |
@Maxwell-Alexius I hope you could check #801 |
Enumerable
module in Ruby originally was included in Array class and it has pre-defined methods such as the#map
,#select
and#reduce
. In original Ruby, it requires also to define the#each
method when included Enumerable module.The text was updated successfully, but these errors were encountered: