setSafeCommutativeSemigroup

context(registry: MutableOwnedProviderRegistry<KoneContextRegistry>)
fun Long.Companion.setSafeCommutativeSemigroup()(source)

Registers the safe CommutativeSemigroup context for Long (with overflow checking) in the given registry.

Context Parameters

registry

The mutable owned provider registry to register the context into.


context(registry: MutableOwnedProviderRegistry<KoneContextRegistry>)
fun Double.Companion.setSafeCommutativeSemigroup()(source)

Registers the safe CommutativeSemigroup context for Double (with NaN/Infinity validation) in the given registry.

Context Parameters

registry

The mutable owned provider registry to register the context into.