@@ -75,7 +75,7 @@ public void f(final P2<Either<P1<A>, Actor<A>>, Promise<A>> p) {
7575 */
7676 public static <A > Promise <A > promise (final Strategy <Unit > s , final P1 <A > a ) {
7777 final Promise <A > p = mkPromise (s );
78- p .actor .act (P . p (Either .<P1 <A >, Actor <A >>left (a ), p ));
78+ p .actor .act (p (Either .<P1 <A >, Actor <A >>left (a ), p ));
7979 return p ;
8080 }
8181
@@ -118,7 +118,7 @@ public static <A, B> F<A, Promise<B>> promise(final Strategy<Unit> s, final F<A,
118118 * @param a An actor that will receive this Promise's value in the future.
119119 */
120120 public void to (final Actor <A > a ) {
121- actor .act (P . p (Either .<P1 <A >, Actor <A >>right (a ), this ));
121+ actor .act (p (Either .<P1 <A >, Actor <A >>right (a ), this ));
122122 }
123123
124124 /**
@@ -176,7 +176,7 @@ public <B> Promise<B> bind(final F<A, Promise<B>> f) {
176176 final Promise <B > r = mkPromise (s );
177177 final Actor <B > ab = actor (s , new Effect1 <B >() {
178178 public void f (final B b ) {
179- r .actor .act (P . p (Either .<P1 <B >, Actor <B >>left (P . p (b )), r ));
179+ r .actor .act (p (Either .<P1 <B >, Actor <B >>left (p (b )), r ));
180180 }
181181 });
182182 to (ab .promise ().contramap (f ));
@@ -233,7 +233,7 @@ public static <A, B, C> F<Promise<A>, F<Promise<B>, Promise<C>>> liftM2(final F<
233233 * @return A single promise for the given List.
234234 */
235235 public static <A > Promise <List <A >> sequence (final Strategy <Unit > s , final List <Promise <A >> as ) {
236- return join (foldRight (s , liftM2 (List .<A >cons ()), promise (s , P . p (List .<A >nil ()))).f (as ));
236+ return join (foldRight (s , liftM2 (List .<A >cons ()), promise (s , p (List .<A >nil ()))).f (as ));
237237 }
238238
239239 /**
@@ -254,7 +254,7 @@ public static <A> F<List<Promise<A>>, Promise<List<A>>> sequence(final Strategy<
254254 * @return A single promise for the given Stream.
255255 */
256256 public static <A > Promise <Stream <A >> sequence (final Strategy <Unit > s , final Stream <Promise <A >> as ) {
257- return join (foldRightS (s , curry ((Promise <A > o , P1 <Promise <Stream <A >>> p ) -> o .bind (a -> p ._1 ().fmap (Stream .<A >cons_ ().f (a )))), promise (s , P . p (Stream .<A >nil ()))).f (as ));
257+ return join (foldRightS (s , curry ((Promise <A > o , P1 <Promise <Stream <A >>> p ) -> o .bind (a -> p ._1 ().fmap (Stream .<A >cons_ ().f (a )))), promise (s , p (Stream .<A >nil ()))).f (as ));
258258 }
259259
260260 /**
@@ -289,7 +289,7 @@ public static <A> Promise<P1<A>> sequence(final Strategy<Unit> s, final P1<Promi
289289 public static <A , B > F <List <A >, Promise <B >> foldRight (final Strategy <Unit > s , final F <A , F <B , B >> f , final B b ) {
290290 return new F <List <A >, Promise <B >>() {
291291 public Promise <B > f (final List <A > as ) {
292- return as .isEmpty () ? promise (s , p (b )) : liftM2 (f ).f (promise (s , P . p (as .head ()))).f (
292+ return as .isEmpty () ? promise (s , p (b )) : liftM2 (f ).f (promise (s , p (as .head ()))).f (
293293 join (s , P1 .curry (this ).f (as .tail ())));
294294 }
295295 };
@@ -307,7 +307,7 @@ public static <A, B> F<Stream<A>, Promise<B>> foldRightS(final Strategy<Unit> s,
307307 final B b ) {
308308 return new F <Stream <A >, Promise <B >>() {
309309 public Promise <B > f (final Stream <A > as ) {
310- return as .isEmpty () ? promise (s , P . p (b )) : liftM2 (f ).f (promise (s , P . p (as .head ()))).f (
310+ return as .isEmpty () ? promise (s , p (b )) : liftM2 (f ).f (promise (s , p (as .head ()))).f (
311311 Promise .<P1 <B >>join (s , P .lazy (() -> f (as .tail ()._1 ()).fmap (P .<B >p1 ()))));
312312 }
313313 };
0 commit comments