Skip to content

Commit 544cc17

Browse files
hoc081098michaelbull
authored andcommitted
Add Haskell reference documentation to combine functions
Closes #126
1 parent 9e6c5e8 commit 544cc17

File tree

1 file changed

+2
-0
lines changed
  • kotlin-result/src/commonMain/kotlin/com/github/michaelbull/result

1 file changed

+2
-0
lines changed

kotlin-result/src/commonMain/kotlin/com/github/michaelbull/result/Iterable.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ public inline fun <T, R, E> List<T>.foldRight(
137137
* returned list are in the same order as the specified [results].
138138
*
139139
* - Elm: [Result.Extra.combine](http://package.elm-lang.org/packages/elm-community/result-extra/2.2.0/Result-Extra#combine)
140+
* - Haskell: [Data.Traversable.sequenceA](https://hackage.haskell.org/package/base-4.10.0.0/docs/Data-Traversable.html#v:sequenceA)
140141
*/
141142
public fun <V, E, R : Result<V, E>> combine(vararg results: R): Result<List<V>, E> {
142143
return results.asIterable().combine()
@@ -147,6 +148,7 @@ public fun <V, E, R : Result<V, E>> combine(vararg results: R): Result<List<V>,
147148
* list are in the the same order as [this].
148149
*
149150
* - Elm: [Result.Extra.combine](http://package.elm-lang.org/packages/elm-community/result-extra/2.2.0/Result-Extra#combine)
151+
* - Haskell: [Data.Traversable.sequenceA](https://hackage.haskell.org/package/base-4.10.0.0/docs/Data-Traversable.html#v:sequenceA)
150152
*/
151153
public fun <V, E> Iterable<Result<V, E>>.combine(): Result<List<V>, E> {
152154
val values = map { result ->

0 commit comments

Comments
 (0)