io

fun <A> io(thunk: suspend () -> A): IO<A>

Creates an IO instance from a suspendable computation.

Return

An IO instance encapsulating the computation.

Parameters

thunk

The suspendable computation that produces a value of type A.


fun <A> io(value: A): IO<A>