@@ -738,20 +738,14 @@ public final <B> Validation<List<E>, B> accumulate(F<T, B> f) {
738
738
}
739
739
740
740
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 ()));
754
747
}
748
+ }
755
749
756
750
757
751
@@ -784,7 +778,7 @@ public final <B, C, D> Validation<List<E>, D> accumulate(Validation<E, B> v2, Va
784
778
785
779
786
780
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 ));
788
782
if (!list .isEmpty ()) {
789
783
return fail (list );
790
784
} else {
@@ -793,7 +787,7 @@ public final <B, C, D> Validation<List<E>, D> accumulate(Validation<E, B> v2, Va
793
787
}
794
788
795
789
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 ));
797
791
if (!list .isEmpty ()) {
798
792
return fail (list );
799
793
} else {
@@ -802,7 +796,7 @@ public final <B, C, D> Validation<List<E>, D> accumulate(Validation<E, B> v2, Va
802
796
}
803
797
804
798
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 ));
806
800
if (!list .isEmpty ()) {
807
801
return fail (list );
808
802
} else {
0 commit comments