//arrow-core/arrow.core/Validated/void

void

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 =
  //sampleStart
  "Hello World".valid().void()
  //sampleEnd
  println(result)
}

Do you like Arrow?

Arrow Org
<