Skip to content

Conversation

@kyay10
Copy link
Collaborator

@kyay10 kyay10 commented Dec 10, 2025

The goal is to allow usage patterns where accumulating values can depend on other accumulating values.
I'm not super happy with this yet. It doesn't play well with property delegation (because you can't have context parameters on getValue yet, and even then, the design of that feature is unclear).

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

Kover Report

File Coverage [24.27%]
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/RaiseAccumulate.kt 24.27%
Total Project Coverage 47.16%

Comment on lines +40 to +42
val x = accumulating<Int> { raise("hello") }
val y = accumulating<Int> { raise("bye") }
x.value + y.value
Copy link
Member

Choose a reason for hiding this comment

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

Why are these tests changed? We need to ensure that using by works as expected here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

by can't be supported in this PR, annoyingly. This is the biggest reason why I've kept it a draft

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.

3 participants