arrow-validation / arrow.validation.refinedTypes.numeric / Less / less

less

open fun A.less(): Kind<F, A>

Commented method or class

import arrow.core.extensions.order
import arrow.validation.refinedTypes.numeric.validated.less.less

fun main(args: Array<String>) {
  //sampleStart
  val max = 350

  val x = 100
  val y = 300
  val z = 200

  val xyResult = (x + y).less(Int.order(), max)
  val xzResult = (x + z).less(Int.order(), max)
 //sampleEnd

 println(xyResult.isValid)
 println(xzResult.isValid)
 }

open fun <B> A.less(f: (A) -> B): Kind<F, B>

Do you like Arrow?

Arrow Org
<