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

feat(hydroflow_plus): implement keyed fold and reduce #1023

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

shadaj
Copy link
Member

@shadaj shadaj commented Jan 9, 2024

feat(hydroflow_plus): implement keyed fold and reduce

Copy link

cloudflare-workers-and-pages bot commented Jan 9, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 51901cd
Status: ✅  Deploy successful!
Preview URL: https://3e51fc2e.hydroflow.pages.dev
Branch Preview URL: https://pr1023.hydroflow.pages.dev

View logs

Comment on lines +364 to +374
#[inline(always)]
/// A: accumulator type
/// T: iterator item type
/// O: output type
fn call_comb_type<A, T, O>(
a: &mut A,
t: T,
f: impl Fn(&mut A, T) -> O,
) -> O {
f(a, t)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment - What does this do? helps type inference?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, just like the non-keyed variants.

@shadaj shadaj merged commit 73e9b68 into main Jan 9, 2024
31 checks passed
@shadaj shadaj deleted the pr1023 branch January 9, 2024 19:21
nickjiang2378 pushed a commit to nickjiang2378/hydroflow that referenced this pull request Jan 25, 2024
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.

2 participants