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

Added Lambda.foldi function. #9054

Merged

Conversation

JaviCerveraIngram
Copy link
Contributor

@JaviCerveraIngram JaviCerveraIngram commented Dec 24, 2019

A version of Lambda.fold which also passes the element index to the folding function.

@kLabz
Copy link
Contributor

kLabz commented Dec 24, 2019

Lambda already has fold

@JaviCerveraIngram
Copy link
Contributor Author

I missed that one. It does not support passing the current index though, which is useful in many situations. What if I refactor this as foldi, and change the parameters so they are consistent with the ones in fold?

@RealyUniqueName
Copy link
Member

What if I refactor this as foldi, and change the parameters so they are consistent with the ones in fold?

I think that could be a nice addition to Lambda

@JaviCerveraIngram JaviCerveraIngram changed the title Added Lambda.reduce function. Added Lambda.foldi function. Dec 24, 2019
@JaviCerveraIngram
Copy link
Contributor Author

JaviCerveraIngram commented Dec 24, 2019

I think that could be a nice addition to Lambda

Done.

@RealyUniqueName
Copy link
Member

Please, add some tests to Lambda.unit.hx

@JaviCerveraIngram
Copy link
Contributor Author

Please, add some tests to Lambda.unit.hx

Done :)

@RealyUniqueName RealyUniqueName merged commit a6ae54b into HaxeFoundation:development Dec 24, 2019
@RealyUniqueName
Copy link
Member

Thanks

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

Successfully merging this pull request may close these issues.

None yet

3 participants