public static <A> IO<A> io(Supplier<A> supplier) {
        return new IO<A>() {
            @Override
            public A unsafePerformIO() {
                return supplier.get();
            }

            @Override
            public CompletableFuture<A> unsafePerformAsyncIO(Executor executor) {
                return supplyAsync(supplier, executor);
            }
        };
    }
public static < A > IO < A > io ( Supplier < A > supplier ) { return new IO < A > ( ) { @ Override public A unsafePerformIO ( ) { return supplier . get ( ) ; } @ Override public CompletableFuture < A > unsafePerformAsyncIO ( Executor executor ) { return supplyAsync ( supplier , executor ) ; } } ; }
Static factory method for coercing a lambda to an {@link IO}.

@param supplier the lambda to coerce
@param <A>      the result type
@return the {@link IO}