Uses of Interface
fj.F0

Packages that use F0
Package
Description
Types that set the premise for the existence of Functional Java.
Functional control abstractions.
Parallelization strategies.
Common algebraic data types.
Fixed-length vectors
A prelude of commonly used first-class functions
Parser combinators.
  • Uses of F0 in fj

    Classes in fj that implement F0
    Modifier and Type
    Class
    Description
    class 
    P1<A>
     
    (package private) static final class 
     
    (package private) static class 
     
    (package private) static final class 
     
    (package private) static final class 
     
    Fields in fj declared as F0
    Modifier and Type
    Field
    Description
    private F0<A>
    P1.Memo.fa
     
    private final F0<A>
    P1.ReferenceMemo.fa
     
    Methods in fj with parameters of type F0
    Modifier and Type
    Method
    Description
    static <A> boolean
    Equal.equals0(Class<? super A> clazz, A self, Object other, F0<Equal<A>> equal)
    Helper method to implement Object.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 to P1._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 to P1._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 using P.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 to P1._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)
     
    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 to P1._1() and at each subsequent call if and only if the reference have been garbage collected.
    Constructors in fj with parameters of type F0
    Modifier
    Constructor
    Description
    (package private)
    Memo(F0<A> fa)
     
    (package private)
     
    (package private)
     
    (package private)
     
  • 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> Callable<A>
    Callables.fromEither(F0<Either<Exception,A>> e)
    Turns a given Either value into the equivalent Callable.
    static <A> 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
    final 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 final 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.
    final 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)
    Constructs a lazy evaluation of an expression that produces Eval.
    Validation.FailProjection.failE(F0<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)
     
    final <B> B
    Option.option(F0<B> b, F<A,B> f)
    Performs a reduction on this optional value using the given arguments.
    final Option<A>
    Option.orElse(F0<Option<A>> o)
    Returns this optional value if there is one, otherwise, returns the argument optional value.
    Validation.FailProjection.orFail(F0<E> e)
    Returns the failing value or the given value.
    final 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.
    final 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.
    final A
    Option.orSome(F0<A> a)
    Returns the value of this optional value or the given argument.
    final T
    Validation.orSuccess(F0<T> t)
    Returns the success value or the given value.
    final 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.
    final 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.
    Either.LeftProjection.orValue(F0<A> a)
    The value of this projection or the given argument.
    Either.RightProjection.orValue(F0<B> b)
    The value of this projection or the given argument.
    Either3.LeftProjection.orValue(F0<A> f)
     
    Either3.MiddleProjection.orValue(F0<B> f)
     
    Either3.RightProjection.orValue(F0<C> f)
     
    static <A> Stream<P1<A>>
    Stream.sequence(F0<Stream<A>> p)
    Sequence through the Stream monad.
    final Stream<A>
    Stream.snoc(F0<A> a)
    Append the given element to this stream to produce a new stream.
    final T
    Validation.successE(F0<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 in Left if empty, or the first element in Right.
    <X> Either<X,A>
    Array.toEither(F0<X> x)
    Returns an either projection of this array; the given argument in Left if empty, or the first element in Right.
    final <X> Either<X,A>
    List.toEither(F0<X> x)
    Returns an either projection of this list; the given argument in Left if empty, or the first element in Right.
    final <X> Either<X,A>
    Option.toEither(F0<X> x)
    Returns an either projection of this optional value; the given argument in Left if no value, or the value in Right.
    final <X> Either<X,A>
    Stream.toEither(F0<X> x)
    Returns an either projection of this stream; the given argument in Left if empty, or the first element in Right.
    Either.LeftProjection.valueE(F0<String> err)
    Returns the value of this projection or fails with the given error message.
    Either.RightProjection.valueE(F0<String> err)
    Returns the value of this projection or fails with the given error message.
    final A
    Option.valueE(F0<String> message)
    Returns the value of this optional value or fails with the given message.
    Constructors in fj.data with parameters of type F0
    Modifier
    Constructor
    Description
    (package private)
    Always(F0<A> supplier)
     
    (package private)
    Cons(A head, F0<Stream<A>> tail)
     
    (package private)
    DeferEval(F0<Eval<A>> producer)
     
    (package private)
    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> B
    Visitor.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> B
    Visitor.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
    Parser.CharsParser.alpha(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces an alpha character.
    Parser.CharsParser.alphaNum(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces an alpha-numeric character.
    Parser.CharsParser.character(F0<E> e)
    Returns a parser that produces a character if one is available or fails with the given error.
    Parser.CharsParser.character(F0<E> missing, F<Character,E> sat, char c)
    Returns a parser that produces the given character or fails otherwise.
    Parser.CharsParser.characters(F0<E> missing, int n)
    Returns a parser that produces the given number of characters, or fails with the given error.
    Parser.CharsParser.characters(F0<E> missing, F<Character,E> sat, Stream<Character> cs)
    Returns a parser that produces the given stream of characters or fails otherwise.
    Parser.CharsParser.defined(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a defined character.
    static <E> Parser<Stream<Character>,Digit,E>
    Parser.CharsParser.digit(F0<E> missing, F<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.
    Parser.CharsParser.highSurrogate(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a high-surrogate character.
    Parser.CharsParser.identifierIgnorable(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces an identifier-ignorable character.
    Parser.CharsParser.isoControl(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces an ISO control character.
    Parser.CharsParser.javaIdentifierPart(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a Java identifier part character.
    Parser.CharsParser.javaIdentifierStart(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a Java identifier start character.
    Parser.CharsParser.lower(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a lower-case character.
    Parser.CharsParser.lowSurrogate(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a low-surrogate character.
    Parser.CharsParser.mirrored(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a mirrored character.
    Parser.not(F0<E> e)
    Returns a parser that negates this parser.
    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.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,Boolean> f)
    Returns a parser that produces an element from the stream that satisfies the given predicate, or fails.
    Parser.CharsParser.space(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a space character.
    static <E> Parser<Stream<Character>,String,E>
    Parser.CharsParser.string(F0<E> missing, F<Character,E> sat, String s)
    Returns a parser that produces the given string or fails otherwise.
    Parser.CharsParser.titleCase(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a title-case character.
    Parser.CharsParser.unicodeIdentiferPart(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a unicode identifier part character.
    Parser.CharsParser.unicodeIdentiferStart(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a unicode identifier start character.
    Parser.CharsParser.upper(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a upper-case character.
    Parser.CharsParser.whitespace(F0<E> missing, F<Character,E> sat)
    Returns a parser that produces a white-space character.