Constructing an IO
An IO can be constructed using IO.delay to capture side effects as an IO value
val stringIO : IO[String] = IO.delay("Hello World!")
Most often, people will use the apply method which internally just calls the delay method.
Continue reading “Essential Effects 02: Cats Effect IO”