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

Merge functional helpers behind a common iterator interface #214

Open
giann opened this issue Oct 17, 2023 · 0 comments
Open

Merge functional helpers behind a common iterator interface #214

giann opened this issue Oct 17, 2023 · 0 comments
Labels
language Issue related to the language proposal Something we consider doing
Milestone

Comments

@giann
Copy link
Collaborator

giann commented Oct 17, 2023

Right now lists and maps have their own version of map, filter, reduce, etc.

We could imagine a common iterator interface supported by fibers that both could implement.
This way any user defined object could also implement that interface.

var filtered = [1, 2, 3]
    .iter()
    .filter(
        fun (int i, int element) -> element % 2 == 0
    );
@giann giann added language Issue related to the language proposal Something we consider doing labels Oct 17, 2023
@giann giann added this to the 0.4.0 milestone Oct 17, 2023
@giann giann changed the title Merge function helpers behind a common iterator interface Merge functional helpers behind a common iterator interface Oct 17, 2023
@giann giann modified the milestones: 0.4.0, 0.5.0 May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language Issue related to the language proposal Something we consider doing
Projects
None yet
Development

No branches or pull requests

1 participant