Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Remove Functor#unit usage #72

Merged
merged 1 commit into from Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion arrow-docs/src/main/kotlin/RecursionHelper.kt
Expand Up @@ -60,7 +60,7 @@ fun <A, B> lift(arg0: Function1<A, B>): Function1<Kind<ForIntListPattern, A>, Ki
"EXTENSION_SHADOWED_BY_MEMBER"
)
fun <A> Kind<ForIntListPattern, A>.void(): IntListPattern<Unit> = IntListPattern.functor().run {
unit<A>() as IntListPattern<kotlin.Unit>
void<A>() as IntListPattern<kotlin.Unit>
}

@JvmName("fproduct")
Expand Down
2 changes: 1 addition & 1 deletion arrow-optics/src/main/kotlin/arrow/optics/Traversal.kt
Expand Up @@ -208,7 +208,7 @@ interface PTraversal<S, T, A, B> : PTraversalOf<S, T, A, B> {
* Map each target to a Monoid and combine the results
*/
fun <R> foldMap(M: Monoid<R>, s: S, f: (A) -> R): R =
modifyF(Const.applicative(M), s) { b -> Const(f(b)) }.value()
modifyF(Const.applicative(M), s) { b -> Const<R, B>(f(b)) }.value()

/**
* Fold using the given [Monoid] instance.
Expand Down