Package fj
Class P
java.lang.Object
fj.P
Functions across products.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A> P1
<A> 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> static <A,
B> P2 <A, B> static <A,
B, C> P3 <A, B, C> static <A,
B, C, D>
P4<A, B, C, D> static <A,
B, C, D, E>
P5<A, B, C, D, E> static <A,
B, C, D, E, F$>
P6<A, B, C, D, E, F$> static <A,
B, C, D, E, F$, G>
P7<A, B, C, D, E, F$, G> lazy
(F<Unit, A> fa, F<Unit, B> fb, F<Unit, C> fc, F<Unit, D> fd, F<Unit, E> fe, F<Unit, F$> ff, F<Unit, G> fg) static <A,
B, C, D, E, F$, G, H>
P8<A, B, C, D, E, F$, G, H> lazy
(F<Unit, A> fa, F<Unit, B> fb, F<Unit, C> fc, F<Unit, D> fd, F<Unit, E> fe, F<Unit, F$> ff, F<Unit, G> fg, F<Unit, H> fh) static <A> P1
<A> 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> static <A,
B, C> P3 <A, B, C> static <A,
B, C, D>
P4<A, B, C, D> static <A,
B, C, D, E>
P5<A, B, C, D, E> static <A,
B, C, D, E, F>
P6<A, B, C, D, E, F> static <A,
B, C, D, E, F, G>
P7<A, B, C, D, E, F, G> static <A,
B, C, D, E, F, G, H>
P8<A, B, C, D, E, F, G, H> static <A,
B> P2 <A, B> lazyProduct
(F0<P2<A, B>> f) static <A> P1
<A> Convert a F0 into a P1, using weak call-by-need semantic usingweakMemo(F0)
.static <A> P1
<A> p
(A a) A function that puts an element in a product-1.static <A,
B> P2 <A, B> p
(A a, B b) A function that puts elements in a product-2.static <A,
B, C> P3 <A, B, C> p
(A a, B b, C c) A function that puts elements in a product-3.static <A,
B, C, D>
P4<A, B, C, D> p
(A a, B b, C c, D d) A function that puts elements in a product-4.static <A,
B, C, D, E>
P5<A, B, C, D, E> p
(A a, B b, C c, D d, E e) A function that puts elements in a product-5.static <A,
B, C, D, E, F$>
P6<A, B, C, D, E, F$> p
(A a, B b, C c, D d, E e, F$ f) A function that puts elements in a product-6.static <A,
B, C, D, E, F$, G>
P7<A, B, C, D, E, F$, G> p
(A a, B b, C c, D d, E e, F$ f, G g) A function that puts elements in a product-7.static <A,
B, C, D, E, F$, G, H>
P8<A, B, C, D, E, F$, G, H> p
(A a, B b, C c, D d, E e, F$ f, G g, H h) A function that puts elements in a product-8.p1()
A function that puts an element in a product-1.p2()
A function that puts an element in a product-2.p3()
A function that puts elements in a product-3.p4()
A function that puts an element in a product-4.p5()
A function that puts an element in a product-5.p6()
A function that puts an element in a product-6.p7()
A function that puts an element in a product-7.p8()
A function that puts an element in a product-8.static <A> P1
<A> 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.static <A> P1
<A> 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.
-
Constructor Details
-
P
private P()
-
-
Method Details
-
p1
A function that puts an element in a product-1.- Returns:
- A function that puts an element in a product-1.
-
p
A function that puts an element in a product-1.- Parameters:
a
- The element.- Returns:
- The product-1.
-
hardMemo
Convert a F0 into a P1, using call-by-need semantic: function f is evaluated at most once, at first toP1._1()
. -
weakMemo
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. -
softMemo
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. to avoid OutOfMemoryErrors). -
memo
Convert a F0 into a P1, using weak call-by-need semantic usingweakMemo(F0)
. -
lazy
Convert a F0 into a P1, using call-by-name semantic: function f is evaluated at each call toP1._1()
. -
lazy
-
lazy
-
lazy
-
lazy
-
lazy
-
lazy
-
lazy
-
lazyProduct
-
p2
A function that puts an element in a product-2.- Returns:
- A function that puts an element in a product-2.
-
p
A function that puts elements in a product-2.- Parameters:
a
- An element.b
- An element.- Returns:
- The product-2.
-
p3
A function that puts elements in a product-3.- Returns:
- A function that puts elements in a product-3.
-
p
A function that puts elements in a product-3.- Parameters:
a
- An element.b
- An element.c
- An element.- Returns:
- The product-3.
-
p4
A function that puts an element in a product-4.- Returns:
- A function that puts an element in a product-4.
-
p
A function that puts elements in a product-4.- Parameters:
a
- An element.b
- An element.c
- An element.d
- An element.- Returns:
- The product-4.
-
p5
A function that puts an element in a product-5.- Returns:
- A function that puts an element in a product-5.
-
p
A function that puts elements in a product-5.- Parameters:
a
- An element.b
- An element.c
- An element.d
- An element.e
- An element.- Returns:
- The product-5.
-
p6
A function that puts an element in a product-6.- Returns:
- A function that puts an element in a product-6.
-
p
A function that puts elements in a product-6.- Parameters:
a
- An element.b
- An element.c
- An element.d
- An element.e
- An element.f
- An element.- Returns:
- The product-6.
-
p7
A function that puts an element in a product-7.- Returns:
- A function that puts an element in a product-7.
-
p
A function that puts elements in a product-7.- Parameters:
a
- An element.b
- An element.c
- An element.d
- An element.e
- An element.f
- An element.g
- An element.- Returns:
- The product-7.
-
p8
public static <A,B, F<A,C, D, E, F$, G, H> F<B, p8()F<C, F<D, F<E, F<F$, F<G, F<H, P8<A, B, C, D, E, F$, G, H>>>>>>>>> A function that puts an element in a product-8.- Returns:
- A function that puts an element in a product-8.
-
p
public static <A,B, P8<A,C, D, E, F$, G, H> B, pC, D, E, F$, G, H> (A a, B b, C c, D d, E e, F$ f, G g, H h) A function that puts elements in a product-8.- Parameters:
a
- An element.b
- An element.c
- An element.d
- An element.e
- An element.f
- An element.g
- An element.h
- An element.- Returns:
- The product-8.
-
lazy
-
lazy
-
lazy
-
lazy
-
lazy
-
lazy
-
lazy
-
lazy
-