now

fun <A> now(a: A): Eval<A>(source)

Creates an Eval instance from an already constructed value but still defers evaluation when chaining expressions with map and flatMap

Parameters

a

is an already computed value of type A

import arrow.core.*

fun main() {
//sampleStart
val eager = Eval.now(1).map { it + 1 }
println(eager.value())
//sampleEnd
}

It will return 2.