Skip to content

Ensure the list contains element before calling reduce#77

Open
Bcricholf wants to merge 1 commit into
Dimibe:mainfrom
Bcricholf:patch-1
Open

Ensure the list contains element before calling reduce#77
Bcricholf wants to merge 1 commit into
Dimibe:mainfrom
Bcricholf:patch-1

Conversation

@Bcricholf

Copy link
Copy Markdown

There an Exception when the reduce function is called on an empty list. However, in my use case, it is possible to empty the list, which causes an error. I therefore ensure that the list contains at least one element before calling the reduce function.

I have see the PRs #53 and #64 but there state is not good with the problem and the latest version of main.

There an Exception when the reduce function is called on an empty list.
However, in my use case, it is possible to empty the list, which causes an error.
I therefore ensure that the list contains at least one element before calling the reduce function.
@Bcricholf Bcricholf requested a review from Dimibe as a code owner October 3, 2025 05:31
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