Skip to content

Commit

Permalink
Deprecation of Semigroup and Monoid (#2935)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
  • Loading branch information
serras and nomisRev authored Mar 10, 2023
1 parent 55d441c commit 1fd8cca
Show file tree
Hide file tree
Showing 35 changed files with 1,261 additions and 1,081 deletions.
36 changes: 30 additions & 6 deletions arrow-libs/core/arrow-core/api/arrow-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public final class arrow/core/Const$Companion {
}

public final class arrow/core/ConstKt {
public static final field ConstDeprecation Ljava/lang/String;
public static final fun combine (Larrow/core/Const;Larrow/typeclasses/Semigroup;Larrow/core/Const;)Larrow/core/Const;
public static final fun compareTo (Larrow/core/Const;Larrow/core/Const;)I
public static final fun const (Ljava/lang/Object;)Larrow/core/Const;
Expand Down Expand Up @@ -283,6 +284,7 @@ public final class arrow/core/EitherKt {
public static final fun bisequenceOption (Larrow/core/Either;)Larrow/core/Option;
public static final fun bisequenceValidated (Larrow/core/Either;)Larrow/core/Validated;
public static final fun catch (Larrow/core/Either;Lkotlin/jvm/functions/Function2;)Larrow/core/Either;
public static final fun combine (Larrow/core/Either;Larrow/core/Either;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Larrow/core/Either;
public static final fun combine (Larrow/core/Either;Larrow/typeclasses/Semigroup;Larrow/typeclasses/Semigroup;Larrow/core/Either;)Larrow/core/Either;
public static final fun combineAll (Ljava/lang/Iterable;Larrow/typeclasses/Monoid;Larrow/typeclasses/Monoid;)Larrow/core/Either;
public static final fun combineK (Larrow/core/Either;Larrow/core/Either;)Larrow/core/Either;
Expand Down Expand Up @@ -585,10 +587,13 @@ public final class arrow/core/IorKt {
public static final fun bisequenceOption (Larrow/core/Ior;)Larrow/core/Option;
public static final fun bisequenceValidated (Larrow/core/Ior;Larrow/typeclasses/Semigroup;)Larrow/core/Validated;
public static final fun bothIor (Lkotlin/Pair;)Larrow/core/Ior;
public static final fun combine (Larrow/core/Ior;Larrow/core/Ior;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Larrow/core/Ior;
public static final fun combine (Larrow/core/Ior;Larrow/typeclasses/Semigroup;Larrow/typeclasses/Semigroup;Larrow/core/Ior;)Larrow/core/Ior;
public static final fun compareTo (Larrow/core/Ior;Larrow/core/Ior;)I
public static final fun flatMap (Larrow/core/Ior;Larrow/typeclasses/Semigroup;Lkotlin/jvm/functions/Function1;)Larrow/core/Ior;
public static final fun flatMap (Larrow/core/Ior;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Larrow/core/Ior;
public static final fun flatten (Larrow/core/Ior;Larrow/typeclasses/Semigroup;)Larrow/core/Ior;
public static final fun flatten (Larrow/core/Ior;Lkotlin/jvm/functions/Function2;)Larrow/core/Ior;
public static final synthetic fun getOrElse (Larrow/core/Ior;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
public static final fun getOrElse (Larrow/core/Ior;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun leftIor (Ljava/lang/Object;)Larrow/core/Ior;
Expand Down Expand Up @@ -658,6 +663,7 @@ public final class arrow/core/IterableKt {
public static final fun rightPadZip (Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/List;
public static final fun rightPadZip (Ljava/lang/Iterable;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function2;)Ljava/util/List;
public static final fun salign (Ljava/lang/Iterable;Larrow/typeclasses/Semigroup;Ljava/lang/Iterable;)Ljava/lang/Iterable;
public static final fun salign (Ljava/lang/Iterable;Lkotlin/jvm/functions/Function2;Ljava/lang/Iterable;)Ljava/lang/Iterable;
public static final fun separateEither (Ljava/lang/Iterable;)Lkotlin/Pair;
public static final fun separateIor (Ljava/lang/Iterable;)Lkotlin/Pair;
public static final fun separateValidated (Ljava/lang/Iterable;)Lkotlin/Pair;
Expand Down Expand Up @@ -713,6 +719,7 @@ public final class arrow/core/MapKt {
public static final fun align (Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map;
public static final fun align (Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map;
public static final fun combine (Ljava/util/Map;Larrow/typeclasses/Semigroup;Ljava/util/Map;)Ljava/util/Map;
public static final fun combine (Ljava/util/Map;Ljava/util/Map;Lkotlin/jvm/functions/Function2;)Ljava/util/Map;
public static final fun combineAll (Ljava/lang/Iterable;Larrow/typeclasses/Semigroup;)Ljava/util/Map;
public static final fun filterMap (Ljava/util/Map;Lkotlin/jvm/functions/Function1;)Ljava/util/Map;
public static final fun filterOption (Ljava/util/Map;)Ljava/util/Map;
Expand Down Expand Up @@ -788,6 +795,7 @@ public final class arrow/core/NonEmptyList : kotlin/collections/AbstractList {
public final fun plus (Larrow/core/NonEmptyList;)Larrow/core/NonEmptyList;
public final fun plus (Ljava/lang/Object;)Larrow/core/NonEmptyList;
public final fun plus (Ljava/util/List;)Larrow/core/NonEmptyList;
public final fun salign (Larrow/core/NonEmptyList;Lkotlin/jvm/functions/Function2;)Larrow/core/NonEmptyList;
public final fun salign (Larrow/typeclasses/Semigroup;Larrow/core/NonEmptyList;)Larrow/core/NonEmptyList;
public final fun toList ()Ljava/util/List;
public fun toString ()Ljava/lang/String;
Expand Down Expand Up @@ -981,6 +989,7 @@ public final class arrow/core/Option$Companion {
}

public final class arrow/core/OptionKt {
public static final fun combine (Larrow/core/Option;Larrow/core/Option;Lkotlin/jvm/functions/Function2;)Larrow/core/Option;
public static final fun combine (Larrow/core/Option;Larrow/typeclasses/Semigroup;Larrow/core/Option;)Larrow/core/Option;
public static final fun combineAll (Larrow/core/Option;Larrow/typeclasses/Monoid;)Ljava/lang/Object;
public static final fun combineAll (Ljava/lang/Iterable;Larrow/typeclasses/Monoid;)Larrow/core/Option;
Expand Down Expand Up @@ -1579,6 +1588,7 @@ public final class arrow/core/SequenceKt {
public static final fun rightPadZip (Lkotlin/sequences/Sequence;Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence;
public static final fun rightPadZip (Lkotlin/sequences/Sequence;Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function2;)Lkotlin/sequences/Sequence;
public static final fun salign (Lkotlin/sequences/Sequence;Larrow/typeclasses/Semigroup;Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence;
public static final fun salign (Lkotlin/sequences/Sequence;Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function2;)Lkotlin/sequences/Sequence;
public static final fun separateEither (Lkotlin/sequences/Sequence;)Lkotlin/Pair;
public static final fun separateValidated (Lkotlin/sequences/Sequence;)Lkotlin/Pair;
public static final fun sequence (Lkotlin/sequences/Sequence;)Larrow/core/Either;
Expand Down Expand Up @@ -2877,6 +2887,7 @@ public final class arrow/core/continuations/FoldContinuation : arrow/core/contin

public final class arrow/core/continuations/IorEagerEffectScope : arrow/core/continuations/EagerEffectScope, arrow/typeclasses/Semigroup {
public fun <init> (Larrow/typeclasses/Semigroup;Larrow/core/continuations/EagerEffectScope;)V
public fun append (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun attempt (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun bind (Larrow/core/Either;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun bind (Larrow/core/Ior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Expand All @@ -2897,6 +2908,7 @@ public final class arrow/core/continuations/IorEagerEffectScope : arrow/core/con

public final class arrow/core/continuations/IorEffectScope : arrow/core/continuations/EffectScope, arrow/typeclasses/Semigroup {
public fun <init> (Larrow/typeclasses/Semigroup;Larrow/core/continuations/EffectScope;)V
public fun append (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun attempt (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun bind (Larrow/core/Either;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun bind (Larrow/core/Ior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Expand Down Expand Up @@ -3246,8 +3258,8 @@ public final class arrow/core/raise/DefaultRaise : arrow/core/raise/Raise {
public fun shift (Ljava/lang/Object;)Ljava/lang/Object;
}

public final class arrow/core/raise/IorRaise : arrow/core/raise/Raise, arrow/typeclasses/Semigroup {
public fun <init> (Larrow/typeclasses/Semigroup;Ljava/util/concurrent/atomic/AtomicReference;Larrow/core/raise/Raise;)V
public final class arrow/core/raise/IorRaise : arrow/core/raise/Raise {
public fun <init> (Lkotlin/jvm/functions/Function2;Ljava/util/concurrent/atomic/AtomicReference;Larrow/core/raise/Raise;)V
public fun attempt (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun bind (Larrow/core/Either;)Ljava/lang/Object;
public final fun bind (Larrow/core/Ior;)Ljava/lang/Object;
Expand All @@ -3259,11 +3271,8 @@ public final class arrow/core/raise/IorRaise : arrow/core/raise/Raise, arrow/typ
public fun catch (Larrow/core/continuations/Effect;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun catch (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public fun catch (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun combine (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun invoke (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public fun invoke (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun maybeCombine (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun raise (Ljava/lang/Object;)Ljava/lang/Void;
public fun recover (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public fun recover (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Expand Down Expand Up @@ -3465,7 +3474,7 @@ public final class arrow/core/raise/RaiseKt {
public static final fun getOrElse (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun getOrNull (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun getOrNull (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun ior (Larrow/typeclasses/Semigroup;Lkotlin/jvm/functions/Function1;)Larrow/core/Ior;
public static final fun ior (Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Larrow/core/Ior;
public static final fun mapOrAccumulate (Larrow/core/raise/Raise;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function2;)Ljava/util/List;
public static final fun mapOrAccumulate (Larrow/core/raise/Raise;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Ljava/util/List;
public static final fun merge (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
Expand Down Expand Up @@ -3604,6 +3613,7 @@ public final class arrow/typeclasses/Monoid$Companion {
}

public final class arrow/typeclasses/Monoid$DefaultImpls {
public static fun append (Larrow/typeclasses/Monoid;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public static fun combineAll (Larrow/typeclasses/Monoid;Ljava/util/Collection;)Ljava/lang/Object;
public static fun combineAll (Larrow/typeclasses/Monoid;Ljava/util/List;)Ljava/lang/Object;
public static fun fold (Larrow/typeclasses/Monoid;Ljava/util/Collection;)Ljava/lang/Object;
Expand All @@ -3612,13 +3622,18 @@ public final class arrow/typeclasses/Monoid$DefaultImpls {
public static fun plus (Larrow/typeclasses/Monoid;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
}

public final class arrow/typeclasses/MonoidKt {
public static final field MonoidDeprecation Ljava/lang/String;
}

public abstract interface class arrow/typeclasses/Semigroup {
public static final field Companion Larrow/typeclasses/Semigroup$Companion;
public static fun Boolean ()Larrow/typeclasses/Semigroup;
public static fun Byte ()Larrow/typeclasses/Semigroup;
public static fun Integer ()Larrow/typeclasses/Semigroup;
public static fun Long ()Larrow/typeclasses/Semigroup;
public static fun Short ()Larrow/typeclasses/Semigroup;
public abstract fun append (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public abstract fun combine (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public static fun constant (Larrow/typeclasses/Semigroup;)Larrow/typeclasses/Semigroup;
public static fun either (Larrow/typeclasses/Semigroup;Larrow/typeclasses/Semigroup;)Larrow/typeclasses/Semigroup;
Expand Down Expand Up @@ -3658,6 +3673,8 @@ public final class arrow/typeclasses/Semigroup$Companion {

public final class arrow/typeclasses/Semigroup$Companion$NonEmptyListSemigroup : arrow/typeclasses/Semigroup {
public static final field INSTANCE Larrow/typeclasses/Semigroup$Companion$NonEmptyListSemigroup;
public fun append (Larrow/core/NonEmptyList;Larrow/core/NonEmptyList;)Larrow/core/NonEmptyList;
public synthetic fun append (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun combine (Larrow/core/NonEmptyList;Larrow/core/NonEmptyList;)Larrow/core/NonEmptyList;
public synthetic fun combine (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun maybeCombine (Larrow/core/NonEmptyList;Larrow/core/NonEmptyList;)Larrow/core/NonEmptyList;
Expand All @@ -3667,10 +3684,16 @@ public final class arrow/typeclasses/Semigroup$Companion$NonEmptyListSemigroup :
}

public final class arrow/typeclasses/Semigroup$DefaultImpls {
public static fun append (Larrow/typeclasses/Semigroup;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public static fun maybeCombine (Larrow/typeclasses/Semigroup;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public static fun plus (Larrow/typeclasses/Semigroup;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
}

public final class arrow/typeclasses/SemigroupKt {
public static final field SemigroupDeprecation Ljava/lang/String;
public static final fun combine (Larrow/typeclasses/Semigroup;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
}

public abstract interface class arrow/typeclasses/Semiring {
public static final field Companion Larrow/typeclasses/Semiring$Companion;
public static fun Byte ()Larrow/typeclasses/Semiring;
Expand Down Expand Up @@ -3704,5 +3727,6 @@ public final class arrow/typeclasses/Semiring$DefaultImpls {
public final class arrow/typeclasses/SemiringKt {
public static final field DoubleInstanceDeprecation Ljava/lang/String;
public static final field FloatInstanceDeprecation Ljava/lang/String;
public static final field SemiringDeprecation Ljava/lang/String;
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ package arrow.core

import arrow.typeclasses.Semigroup

@Deprecated("Const is deprecated in Arrow Core and will be removed in 2.x.x. \n If Const is crucial for you, please let us know on the Arrow Github. Thanks!\n" + " https://github.com/arrow-kt/arrow/issues\n")
public const val ConstDeprecation: String =
"Const is deprecated in Arrow Core and will be removed in 2.x.x. \n If Const is crucial for you, please let us know on the Arrow Github. Thanks!\n" + " https://github.com/arrow-kt/arrow/issues\n"

@Deprecated(ConstDeprecation)
public data class Const<A, out T>(private val value: A) {

@Suppress("UNCHECKED_CAST")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import arrow.core.Either.Companion.resolve
import arrow.core.Either.Left
import arrow.core.Either.Right
import arrow.core.Either.Right.Companion.unit
import arrow.core.computations.ResultEffect.bind
import arrow.core.continuations.Eager
import arrow.core.continuations.EagerEffect
import arrow.core.continuations.Effect
import arrow.core.continuations.Token
import arrow.core.raise.Raise
import arrow.core.raise.either
import arrow.typeclasses.Monoid
import arrow.typeclasses.MonoidDeprecation
import arrow.typeclasses.Semigroup
import arrow.typeclasses.SemigroupDeprecation
import arrow.typeclasses.combine
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.InvocationKind
import kotlin.contracts.contract
Expand Down Expand Up @@ -907,10 +907,10 @@ public sealed class Either<out A, out B> {

@Deprecated(
NicheAPI + "Prefer when or fold instead",
ReplaceWith("fold({ MN.empty() }) { b -> MN.run { MN.empty().combine(f(b)) } }")
ReplaceWith(" fold({ MN.empty() }, f)")
)
public fun <C> foldMap(MN: Monoid<C>, f: (B) -> C): C =
fold({ MN.empty() }) { b -> MN.run { MN.empty().combine(f(b)) } }
fold({ MN.empty() }, f)

@Deprecated(
NicheAPI + "Prefer when or fold instead",
Expand All @@ -921,10 +921,10 @@ public sealed class Either<out A, out B> {

@Deprecated(
NicheAPI + "Prefer when or fold instead",
ReplaceWith("MN.run { fold({ empty().combine(f(it)) }, { empty().combine(g(it)) }) }")
ReplaceWith("fold(f, g)")
)
public inline fun <C> bifoldMap(MN: Monoid<C>, f: (A) -> C, g: (B) -> C): C =
MN.run { fold({ empty().combine(f(it)) }, { empty().combine(g(it)) }) }
fold(f, g)

/**
* Swap the generic parameters [A] and [B] of this [Either].
Expand Down Expand Up @@ -2292,19 +2292,43 @@ public operator fun <A : Comparable<A>, B : Comparable<B>> Either<A, B>.compareT
{ b1 -> other.fold({ 1 }, { b2 -> b1.compareTo(b2) }) }
)

/**
* Combine two [Either] values.
* If both are [Right] then combine both [B] values using [combineRight] or if both are [Left] then combine both [A] values using [combineLeft],
* otherwise it returns the `this` or fallbacks to [other] in case `this` is [Left].
*/
public fun <A, B> Either<A, B>.combine(other: Either<A, B>, combineLeft: (A, A) -> A, combineRight: (B, B) -> B): Either<A, B> =
when (val one = this) {
is Left -> when (other) {
is Left -> Left(combineLeft(one.value, other.value))
is Right -> one
}

is Right -> when (other) {
is Left -> other
is Right -> Right(combineRight(one.value, other.value))
}
}

@Deprecated(
RedundantAPI + "Prefer zipOrAccumulate",
ReplaceWith("Either.zipOrAccumulate({ a, bb -> SGA.run { a.combine(bb) } }, this, b) { a, bb -> SGB.run { a.combine(bb) } }")
SemigroupDeprecation,
ReplaceWith(
"combine(b, SGA::combine, SGB::combine)",
"arrow.typeclasses.combine"
)
)
public fun <A, B> Either<A, B>.combine(SGA: Semigroup<A>, SGB: Semigroup<B>, b: Either<A, B>): Either<A, B> =
Either.zipOrAccumulate({ a, bb -> SGA.run { a.combine(bb) } }, this, b) { a, bb -> SGB.run { a.combine(bb) } }
combine(b, SGA::combine, SGB::combine)

@Deprecated(
RedundantAPI + "Prefer explicit fold instead",
ReplaceWith("fold(Monoid.either(MA, MB))", "arrow.core.fold", "arrow.typeclasses.Monoid")
MonoidDeprecation,
ReplaceWith(
"fold<Either<A, B>, Either<A, B>>(MB.empty().right()) { x, y -> Either.zipOrAccumulate(MA::combine, x, y, MB::combine) }",
"arrow.typeclasses.combine"
)
)
public fun <A, B> Iterable<Either<A, B>>.combineAll(MA: Monoid<A>, MB: Monoid<B>): Either<A, B> =
fold(Monoid.either(MA, MB))
fold<Either<A, B>, Either<A, B>>(MB.empty().right()) { x, y -> Either.zipOrAccumulate(MA::combine, x, y, MB::combine) }

/**
* Given [B] is a sub type of [C], re-type this value from Either<A, B> to Either<A, C>
Expand Down Expand Up @@ -2510,10 +2534,13 @@ public inline fun <A, B, C, D, E, F, G, H, I, J, K, L> Either<A, B>.zip(

@Deprecated(
NicheAPI + "Prefer using the Either DSL, or map",
ReplaceWith("if (n <= 0) Right(MB.empty()) else map { b -> List(n) { b }.fold(MB) }")
ReplaceWith(
"map { b -> List(n) { b }.fold(MB.empty(), MB::combine) }",
"arrow.typeclasses.combine"
)
)
public fun <A, B> Either<A, B>.replicate(n: Int, MB: Monoid<B>): Either<A, B> =
if (n <= 0) Right(MB.empty()) else map { b -> List(n) { b }.fold(MB) }
map { b -> List(n) { b }.fold(MB.empty(), MB::combine) }

@Deprecated(
RedundantAPI + "Prefer if-else statement inside either DSL, or replace with explicit flatMap",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package arrow.core
/**
* The monoid of endomorphisms under composition.
*/
@Deprecated("Semigroup, and Monoid are being deprecated. Use regular function composition instead.")
public data class Endo<A>(val f: (A) -> A) {

public fun combine(g: Endo<A>): Endo<A> =
Expand Down
Loading

0 comments on commit 1fd8cca

Please sign in to comment.