Uses of Interface
fj.F0
-
Packages that use F0 Package Description fj Types that set the premise for the existence of Functional Java.fj.control Functional control abstractions.fj.control.parallel Parallelization strategies.fj.data Common algebraic data types.fj.data.vector Fixed-length vectorsfj.function A prelude of commonly used first-class functionsfj.parser Parser combinators. -
-
Uses of F0 in fj
Classes in fj that implement F0 Modifier and Type Class Description class
P1<A>
(package private) static class
P1.Memo<A>
(package private) static class
P1.ReferenceMemo<A>
(package private) static class
P1.SoftReferenceMemo<A>
(package private) static class
P1.WeakReferenceMemo<A>
Fields in fj declared as F0 Modifier and Type Field Description private F0<A>
P1.Memo. fa
private F0<A>
P1.ReferenceMemo. fa
Methods in fj with parameters of type F0 Modifier and Type Method Description static <A> boolean
Equal. equals0(java.lang.Class<? super A> clazz, A self, java.lang.Object other, F0<Equal<A>> equal)
Helper method to implementObject.equals(Object)
correctly.static <A> P1<A>
P. hardMemo(F0<A> f)
Convert a F0 into a P1, using call-by-need semantic: function f is evaluated at most once, at first toP1._1()
.static <A> P1<A>
P. lazy(F0<A> f)
Convert a F0 into a P1, using call-by-name semantic: function f is evaluated at each call toP1._1()
.static <A,B>
P2<A,B>P. lazy(F0<A> pa, F0<B> pb)
static <A,B,C>
P3<A,B,C>P. lazy(F0<A> pa, F0<B> pb, F0<C> pc)
static <A,B,C,D>
P4<A,B,C,D>P. lazy(F0<A> pa, F0<B> pb, F0<C> pc, F0<D> pd)
static <A,B,C,D,E>
P5<A,B,C,D,E>P. lazy(F0<A> pa, F0<B> pb, F0<C> pc, F0<D> pd, F0<E> pe)
static <A,B,C,D,E,F>
P6<A,B,C,D,E,F>P. lazy(F0<A> pa, F0<B> pb, F0<C> pc, F0<D> pd, F0<E> pe, F0<F> pf)
static <A,B,C,D,E,F,G>
P7<A,B,C,D,E,F,G>P. lazy(F0<A> pa, F0<B> pb, F0<C> pc, F0<D> pd, F0<E> pe, F0<F> pf, F0<G> pg)
static <A,B,C,D,E,F,G,H>
P8<A,B,C,D,E,F,G,H>P. lazy(F0<A> pa, F0<B> pb, F0<C> pc, F0<D> pd, F0<E> pe, F0<F> pf, F0<G> pg, F0<H> ph)
static <A,B>
P2<A,B>P. lazyProduct(F0<P2<A,B>> f)
static <A> P1<A>
P. memo(F0<A> f)
Convert a F0 into a P1, using weak call-by-need semantic usingP.weakMemo(F0)
.static <A> P1<A>
P. softMemo(F0<A> f)
Convert a F0 into a P1, using soft call-by-need semantic: function f is evaluated at first call toP1._1()
and at each subsequent call if and only if the reference have been garbage collected due of shortage of memory (ie.default A
Monoid.Definition. sum(A a, F0<Stream<A>> as)
default A
Monoid.Definition. sum(F0<Stream<A>> as)
default A
Semigroup.Definition. sum(A a, F0<Stream<A>> as)
A
Semigroup. sumStream(A a, F0<Stream<A>> as)
Sums the given values with left-fold, shortcutting the computation as early as possible.static <A> P1<A>
P. weakMemo(F0<A> f)
Convert a F0 into a P1, using weak call-by-need semantic: function f is evaluated at first call toP1._1()
and at each subsequent call if and only if the reference have been garbage collected.Constructors in fj with parameters of type F0 Constructor Description Memo(F0<A> fa)
ReferenceMemo(F0<A> fa)
SoftReferenceMemo(F0<A> self)
WeakReferenceMemo(F0<A> fa)
-
Uses of F0 in fj.control
Methods in fj.control with parameters of type F0 Modifier and Type Method Description static <A> Trampoline<A>
Trampoline. suspend(F0<Trampoline<A>> a)
Suspends the given computation in a thunk. -
Uses of F0 in fj.control.parallel
Methods in fj.control.parallel with parameters of type F0 Modifier and Type Method Description static <A> java.util.concurrent.Callable<A>
Callables. fromEither(F0<Either<java.lang.Exception,A>> e)
Turns a given Either value into the equivalent Callable.static <A> java.util.concurrent.Callable<A>
Callables. fromOption(F0<Option<A>> o)
Turns an optional value into a Callable. -
Uses of F0 in fj.data
Classes in fj.data that implement F0 Modifier and Type Class Description class
$<A,B>
The constant arrow, for attaching a new name to an existing type.Fields in fj.data declared as F0 Modifier and Type Field Description private F0<A>
Eval.Always. supplier
Methods in fj.data with parameters of type F0 Modifier and Type Method Description static <A> Eval<A>
Eval. always(F0<A> a)
Constructs a lazy evaluation without caching.Stream<A>
Stream. append(F0<Stream<A>> as)
Appends the given stream to this stream.abstract <Z> Z
Iteratee.Input. apply(F0<Z> empty, F0<F<E,Z>> el, F0<Z> eof)
static <A> Stream<A>
Stream. cons(A head, F0<Stream<A>> tail)
Prepends the given head element to the given tail element to produce a new stream.static <A> Eval<A>
Eval. defer(F0<Eval<A>> a)
E
Validation.FailProjection. failE(F0<java.lang.String> err)
Returns the failing value or fails with the given error message.static <A> IO<A>
IOFunctions. fromF(F0<A> p)
static <A,B>
Either<A,B>Either. iif(boolean c, F0<B> right, F0<A> left)
If the condition satisfies, return the given B in right, otherwise, return the given A in left.static <A> Option<A>
Option. iif(boolean p, F0<A> a)
Returns an optional value that has a value of the given argument if the given boolean is true, otherwise, returns no value.static <A> Eval<A>
Eval. later(F0<A> a)
Constructs a lazy evaluation with caching.static <A> IO<A>
IOFunctions. lazy(F0<A> p)
static <A> SafeIO<A>
IOFunctions. lazySafe(F0<A> f)
<B> B
Option. option(F0<B> b, F<A,B> f)
Performs a reduction on this optional value using the given arguments.Option<A>
Option. orElse(F0<Option<A>> o)
Returns this optional value if there is one, otherwise, returns the argument optional value.E
Validation.FailProjection. orFail(F0<E> e)
Returns the failing value or the given value.A
List. orHead(F0<A> a)
Returns the head of this list if there is one or the given argument if this list is empty.A
Stream. orHead(F0<A> a)
Returns the head of this stream if there is one or the given argument if this stream is empty.A
Option. orSome(F0<A> a)
Returns the value of this optional value or the given argument.T
Validation. orSuccess(F0<T> t)
Returns the success value or the given value.List<A>
List. orTail(F0<List<A>> as)
Returns the tail of this list if there is one or the given argument if this list is empty.P1<Stream<A>>
Stream. orTail(F0<Stream<A>> as)
Returns the tail of this stream if there is one or the given argument if this stream is empty.A
Either.LeftProjection. orValue(F0<A> a)
The value of this projection or the given argument.B
Either.RightProjection. orValue(F0<B> b)
The value of this projection or the given argument.A
Either3.LeftProjection. orValue(F0<A> f)
B
Either3.MiddleProjection. orValue(F0<B> f)
C
Either3.RightProjection. orValue(F0<C> f)
static <A> Stream<P1<A>>
Stream. sequence(F0<Stream<A>> p)
Sequence through the Stream monad.Stream<A>
Stream. snoc(F0<A> a)
Append the given element to this stream to produce a new stream.T
Validation. successE(F0<java.lang.String> err)
Returns the success value or fails with the given error message.<X> Either<X,A>
Array.ImmutableProjection. toEither(F0<X> x)
Returns an either projection of this array; the given argument inLeft
if empty, or the first element inRight
.<X> Either<X,A>
Array. toEither(F0<X> x)
Returns an either projection of this array; the given argument inLeft
if empty, or the first element inRight
.<X> Either<X,A>
List. toEither(F0<X> x)
Returns an either projection of this list; the given argument inLeft
if empty, or the first element inRight
.<X> Either<X,A>
Option. toEither(F0<X> x)
Returns an either projection of this optional value; the given argument inLeft
if no value, or the value inRight
.<X> Either<X,A>
Stream. toEither(F0<X> x)
Returns an either projection of this stream; the given argument inLeft
if empty, or the first element inRight
.A
Either.LeftProjection. valueE(F0<java.lang.String> err)
Returns the value of this projection or fails with the given error message.B
Either.RightProjection. valueE(F0<java.lang.String> err)
Returns the value of this projection or fails with the given error message.A
Option. valueE(F0<java.lang.String> message)
Returns the value of this optional value or fails with the given message.Constructors in fj.data with parameters of type F0 Constructor Description Always(F0<A> supplier)
Cons(A head, F0<Stream<A>> tail)
DeferEval(F0<Eval<A>> producer)
Later(F0<A> producer)
-
Uses of F0 in fj.data.vector
Methods in fj.data.vector with parameters of type F0 Modifier and Type Method Description static <A> V2<A>
V. v(F0<A> a1, F0<A> a2)
Puts elements in a vector-2.static <A> V3<A>
V. v(P1<A> a1, F0<A> a2, F0<A> a3)
Puts elements in a vector-3.static <A> V4<A>
V. v(P1<A> a1, P1<A> a2, F0<A> a3, F0<A> a4)
Puts elements in a vector-4.static <A> V5<A>
V. v(P1<A> a1, P1<A> a2, P1<A> a3, F0<A> a4, F0<A> a5)
Puts elements in a vector-5. -
Uses of F0 in fj.function
Methods in fj.function that return F0 Modifier and Type Method Description default F0<Unit>
Effect0. toF0()
default F0<Validation<Z,A>>
Try0. toF0()
default F0<Option<Z>>
TryEffect0. toF0()
Methods in fj.function with parameters of type F0 Modifier and Type Method Description static <X> X
Visitor. findFirst(List<Option<X>> values, F0<X> def)
Returns the first value available in the given list of optional values.static <X> X
Visitor. nullablefindFirst(List<X> values, F0<X> def)
Returns the first non-null
value in the given list of optional values.static <A,B>
BVisitor. nullableVisitor(List<F<A,B>> visitors, F0<B> def, A value)
Returns the first non-null
value found in the list of visitors after application of the given value, otherwise returns the given default.static <A,B>
BVisitor. visitor(List<F<A,Option<B>>> visitors, F0<B> def, A value)
Returns the first value found in the list of visitors after application of the given value, otherwise returns the given default. -
Uses of F0 in fj.parser
Methods in fj.parser with parameters of type F0 Modifier and Type Method Description static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. alpha(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces an alpha character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. alphaNum(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces an alpha-numeric character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. character(F0<E> e)
Returns a parser that produces a character if one is available or fails with the given error.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. character(F0<E> missing, F<java.lang.Character,E> sat, char c)
Returns a parser that produces the given character or fails otherwise.static <E> Parser<Stream<java.lang.Character>,Stream<java.lang.Character>,E>
Parser.CharsParser. characters(F0<E> missing, int n)
Returns a parser that produces the given number of characters, or fails with the given error.static <E> Parser<Stream<java.lang.Character>,Stream<java.lang.Character>,E>
Parser.CharsParser. characters(F0<E> missing, F<java.lang.Character,E> sat, Stream<java.lang.Character> cs)
Returns a parser that produces the given stream of characters or fails otherwise.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. defined(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a defined character.static <E> Parser<Stream<java.lang.Character>,Digit,E>
Parser.CharsParser. digit(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a digit (0 to 9).static <I,E>
Parser<Stream<I>,I,E>Parser.StreamParser. element(F0<E> e)
Returns a parser that produces an element from the stream if it is available and fails otherwise.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. highSurrogate(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a high-surrogate character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. identifierIgnorable(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces an identifier-ignorable character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. isoControl(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces an ISO control character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. javaIdentifierPart(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a Java identifier part character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. javaIdentifierStart(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a Java identifier start character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. lower(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a lower-case character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. lowSurrogate(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a low-surrogate character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. mirrored(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a mirrored character.Parser<I,Unit,E>
Parser. not(F0<E> e)
Returns a parser that negates this parser.Parser<I,A,E>
Parser. or(F0<Parser<I,A,E>> alt)
Returns a parser that tries this parser and if it fails, then tries the given parser.Parser<I,A,E>
Parser. or(F0<Parser<I,A,E>> alt, Semigroup<E> s)
Returns a parser that tries this parser and if it fails, then tries the given parser.static <I,E>
Parser<Stream<I>,I,E>Parser.StreamParser. satisfy(F0<E> missing, F<I,E> sat, F<I,java.lang.Boolean> f)
Returns a parser that produces an element from the stream that satisfies the given predicate, or fails.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. space(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a space character.static <E> Parser<Stream<java.lang.Character>,java.lang.String,E>
Parser.CharsParser. string(F0<E> missing, F<java.lang.Character,E> sat, java.lang.String s)
Returns a parser that produces the given string or fails otherwise.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. titleCase(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a title-case character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. unicodeIdentiferPart(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a unicode identifier part character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. unicodeIdentiferStart(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a unicode identifier start character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. upper(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a upper-case character.static <E> Parser<Stream<java.lang.Character>,java.lang.Character,E>
Parser.CharsParser. whitespace(F0<E> missing, F<java.lang.Character,E> sat)
Returns a parser that produces a white-space character.
-