<https://kotlinlang.slack.com/archives/C5UPMM0A0/p...
# arrow
t
https://kotlinlang.slack.com/archives/C5UPMM0A0/p1646811136681089?thread_ts=1646787156.669429&amp;cid=C5UPMM0A0
Iterable::combineAll
looks to be the same as
Iterable::fold
or am I missing something?
s
It's almost the same.
fold
requires
empty
+
combine
while
combineAll
just takes a
Monoid
. If Arrow really need all these variants is a different discussion 😅
t
I dug into the source and I think there is a duplicity https://github.com/arrow-kt/arrow/blob/main/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Iterable.kt#L983 would be the fold I mentioned https://github.com/arrow-kt/arrow/blob/main/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Iterable.kt#L707 this is combine all There is a slight possibility my brain stubbornly ignores the difference 😄 , but I think they are the same.
s
You're correct! Those are identical, one of the two should probably be deprecated...
Great catch!
t
alright I'm gonna open an issue
👍 1
❤️ 2