@@ -738,20 +738,14 @@ public final <B> Validation<List<E>, B> accumulate(F<T, B> f) {
738738 }
739739
740740
741- public final <B , C > Validation <List <E >, C > accumulate (Validation <E , B > v2 , F2 <T , B , C > f ) {
742- List <E > list = List .nil ();
743- if (isFail ()) {
744- list = list .cons (fail ());
745- }
746- if (v2 .isFail ()) {
747- list = list .cons (v2 .fail ());
748- }
749- if (!list .isEmpty ()) {
750- return fail (list );
751- } else {
752- return success (f .f (success (), v2 .success ()));
753- }
741+ public final <B , C > Validation <List <E >, C > accumulate (Validation <E , B > v2 , F2 <T , B , C > f ) {
742+ List <E > list = fails (list (this , v2 ));
743+ if (!list .isEmpty ()) {
744+ return fail (list );
745+ } else {
746+ return success (f .f (success (), v2 .success ()));
754747 }
748+ }
755749
756750
757751
@@ -784,7 +778,7 @@ public final <B, C, D> Validation<List<E>, D> accumulate(Validation<E, B> v2, Va
784778
785779
786780 public final <B , C , D , $E , $F , G > Validation <List <E >, G > accumulate (Validation <E , B > v2 , Validation <E , C > v3 , Validation <E , D > v4 , Validation <E , $E > v5 , Validation <E , $F > v6 , F6 <T , B , C , D , $E , $F , G > f ) {
787- List <E > list = fails (list (this , v2 , v3 , v4 , v5 ));
781+ List <E > list = fails (list (this , v2 , v3 , v4 , v5 , v6 ));
788782 if (!list .isEmpty ()) {
789783 return fail (list );
790784 } else {
@@ -793,7 +787,7 @@ public final <B, C, D> Validation<List<E>, D> accumulate(Validation<E, B> v2, Va
793787 }
794788
795789 public final <B , C , D , $E , $F , G , H > Validation <List <E >, H > accumulate (Validation <E , B > v2 , Validation <E , C > v3 , Validation <E , D > v4 , Validation <E , $E > v5 , Validation <E , $F > v6 , Validation <E , G > v7 , F7 <T , B , C , D , $E , $F , G , H > f ) {
796- List <E > list = fails (list (this , v2 , v3 , v4 , v5 ));
790+ List <E > list = fails (list (this , v2 , v3 , v4 , v5 , v6 , v7 ));
797791 if (!list .isEmpty ()) {
798792 return fail (list );
799793 } else {
@@ -802,7 +796,7 @@ public final <B, C, D> Validation<List<E>, D> accumulate(Validation<E, B> v2, Va
802796 }
803797
804798 public final <B , C , D , $E , $F , G , H , I > Validation <List <E >, I > accumulate (Validation <E , B > v2 , Validation <E , C > v3 , Validation <E , D > v4 , Validation <E , $E > v5 , Validation <E , $F > v6 , Validation <E , G > v7 , Validation <E , H > v8 , F8 <T , B , C , D , $E , $F , G , H , I > f ) {
805- List <E > list = fails (list (this , v2 , v3 , v4 , v5 ));
799+ List <E > list = fails (list (this , v2 , v3 , v4 , v5 , v6 , v7 , v8 ));
806800 if (!list .isEmpty ()) {
807801 return fail (list );
808802 } else {
0 commit comments