Package fj.data
Interface IO<A>
-
- Type Parameters:
A
- the type of the result produced by the IO
- All Superinterfaces:
Try0<A,java.io.IOException>
- All Known Subinterfaces:
SafeIO<A>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface IO<A> extends Try0<A,java.io.IOException>
IO monad for processing files
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <B> IO<B>
append(IO<B> iob)
default <B> IO<B>
bind(F<A,IO<B>> f)
default A
f()
static IO<LazyString>
getContents()
static IO<Unit>
interact(F<LazyString,LazyString> f)
default <B> IO<B>
map(F<A,B> f)
A
run()
default SafeIO<Validation<java.io.IOException,A>>
safe()
-
Methods inherited from interface fj.function.Try0
toEffect0, toF0, toP1, toTryEffect0
-
-
-
-
Method Detail
-
run
A run() throws java.io.IOException
- Throws:
java.io.IOException
-
f
default A f() throws java.io.IOException
-
safe
default SafeIO<Validation<java.io.IOException,A>> safe()
-
getContents
static IO<LazyString> getContents()
-
interact
static IO<Unit> interact(F<LazyString,LazyString> f)
-
-