arrow-core-data / arrow.core / Ior / fromNullables

fromNullables

@JvmStatic fun <A, B> fromNullables(a: A?, b: B?): Ior<A, B>?

Create an Ior from two nullables if at least one of them is defined.

Parameters

a - an element (nullable) for the left side of the Ior

b - an element (nullable) for the right side of the Ior

Return null if both a and b are null. Otherwise an Ior.Left, Ior.Right, or Ior.Both if a, b, or both are defined (respectively).

Do you like Arrow?

Arrow Org
<