common fun void(): Validated<E, Unit>

Discards the A value inside Validated signaling this container may be pointing to a noop or an effect whose return value is deliberately ignored. The singleton value Unit serves as signal.

import arrow.core.*

fun main(args: Array<String>) {
  val result =
  "Hello World".valid().void()

Do you like Arrow?

Arrow Org