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

Implementation of fold function #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

maraschneider
Copy link

@maraschneider maraschneider commented Oct 31, 2021

Hi,

this is my implementation for a fold function in JavaScript.

I did read the instructions when I received the invite and I thought a bit about how I could implement it beforehand.
During my implementation now, I rebased the test commit, which is why the test & implementation commits are close together, time-wise.

If I had more time, I would add two optional parameter to the callback function: currentIndex & the iterable (in the style of the JS reduce function). Also, I chose the for of loop, in order to be able to use async await (to be implemented).

I am looking forward to your feedback.
Regards,
Maraike

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.

1 participant