Divisible extends upon Divide by providing an empty method called conquer. conquer is useful to prove identiy laws when working with Divisible instances.

Extending the serializer example from Divide conquer would simply serialize data to an empty string.

import arrow.Kind
import arrow.core.Tuple2
import arrow.core.toT
import com.example.domain.*

fun main(args: Array<String>) {
   val emptySerializer: SerializerOf<Int> = Serializer.divisible().conquer()

  val result = emptySerializer.fix().func(1)

Main Combinators


Construct an empty value for any Kind<F, A>.


Arrow provides DivisibleLaws in the form of test cases for internal verification of lawful instances and third party apps creating their own Divisible instances.

See Deriving and creating custom typeclass to provide your own Divisible instances for custom datatypes.

Data types

Module Data types
arrow.data Sum, EitherT, Kleisli, OptionT, StateT, WriterT
arrow.typeclasses Const, Conested

Type Class Hierarchy