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

Introduction of CheckedConsumerN and ConsumerN #2908

Open
Koziolek opened this issue Oct 15, 2024 · 0 comments
Open

Introduction of CheckedConsumerN and ConsumerN #2908

Koziolek opened this issue Oct 15, 2024 · 0 comments

Comments

@Koziolek
Copy link

First read this one. Now, let's discuss the introduction of CheckedConsumerN and ConsumerN.

Motivation

There are some tickets that touch peek/tap functionality for:

I tried to implement that for Tuple using FunctionN<params, Void> in Koziolek@8f8a2fd and I use Function because of lack of (Checked)ConsumerN.

Introduction of those consumers gives more flexibility not only for peek/tap functionality, but in the future it will be possible to introduce functionalities similar to forEach but for tuples to emulate object decomposition.

Current status

We have CheckedConsumer that takes one param. We cannot remove if because of backward compatibility, but it could be marked as deprecated and replaced by CheckedConsumer1

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

No branches or pull requests

1 participant