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

multifold #142

Open
koraa opened this issue Nov 9, 2020 · 0 comments
Open

multifold #142

koraa opened this issue Nov 9, 2020 · 0 comments
Labels
enhancement New feature or request needs-api-design question Further information is requested

Comments

@koraa
Copy link
Contributor

koraa commented Nov 9, 2020

Include a fold vector processing API: Multiple fold operations at the same time; e.g. sum and count

const multiFoldl = (seq, ini, fns) => {
  const resv = list(ini);
  each(cartesian(seq, enumerate(fnv)), ([val, [idx, fn]]) => {
    resv[idx] = fn(val, resv[idx]);
  });
  return resv;
};

const multiFoldr, multFoldl1, tryMultiFoldl1, multiFoldr1, tryMultiFoldr1 = 
@koraa koraa added the enhancement New feature or request label Nov 9, 2020
@koraa koraa added needs-api-design question Further information is requested labels Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-api-design question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant