kevin-lee/effectie

Add FxCtor.pureOrError(a) and Fx.pureOrError(a)

Closed this issue · 0 comments

Task

Summary

Add FxCtor.pureOrError(a) and Fx.pureOrError(a)

Project Details

Version:

Description

e.g.)

FxCtor[IO].pureOrError(1)
// IO[Int] = Pure(1)

FxCtor[IO].pureOrError[Int]((throw new RuntimeException("ERROR")): Int)
// IO[Int] = RaiseError(java.lang.RuntimeException("ERROR"))