@@ -25,7 +25,7 @@ private F2Functions() {
2525 * @param a The <code>A</code> to which to apply this function.
2626 * @return The function partially applied to the given argument.
2727 */
28- static public <A , B , C > F <B , C > f (final F2 <A , B , C > f , final A a ) {
28+ public static <A , B , C > F <B , C > f (final F2 <A , B , C > f , final A a ) {
2929 return b -> f .f (a , b );
3030 }
3131
@@ -34,7 +34,7 @@ static public <A, B, C> F<B, C> f(final F2<A, B, C> f, final A a) {
3434 *
3535 * @return a wrapped function of arity-1 that returns another wrapped function.
3636 */
37- static public <A , B , C > F <A , F <B , C >> curry (final F2 <A , B , C > f ) {
37+ public static <A , B , C > F <A , F <B , C >> curry (final F2 <A , B , C > f ) {
3838 return a -> b -> f .f (a , b );
3939 }
4040
@@ -43,7 +43,7 @@ static public <A, B, C> F<A, F<B, C>> curry(final F2<A, B, C> f) {
4343 *
4444 * @return A new function with the arguments of this function flipped.
4545 */
46- static public <A , B , C > F2 <B , A , C > flip (final F2 <A , B , C > f ) {
46+ public static <A , B , C > F2 <B , A , C > flip (final F2 <A , B , C > f ) {
4747 return (b , a ) -> f .f (a , b );
4848 }
4949
@@ -52,7 +52,7 @@ static public <A, B, C> F2<B, A, C> flip(final F2<A, B, C> f) {
5252 *
5353 * @return A new function that calls this function with the elements of a given tuple.
5454 */
55- static public <A , B , C > F <P2 <A , B >, C > tuple (final F2 <A , B , C > f ) {
55+ public static <A , B , C > F <P2 <A , B >, C > tuple (final F2 <A , B , C > f ) {
5656 return p -> f .f (p ._1 (), p ._2 ());
5757 }
5858
@@ -61,7 +61,7 @@ static public <A, B, C> F<P2<A, B>, C> tuple(final F2<A, B, C> f) {
6161 *
6262 * @return This function promoted to transform Arrays.
6363 */
64- static public <A , B , C > F2 <Array <A >, Array <B >, Array <C >> arrayM (final F2 <A , B , C > f ) {
64+ public static <A , B , C > F2 <Array <A >, Array <B >, Array <C >> arrayM (final F2 <A , B , C > f ) {
6565 return (a , b ) -> a .bind (b , curry (f ));
6666 }
6767
@@ -70,7 +70,7 @@ static public <A, B, C> F2<Array<A>, Array<B>, Array<C>> arrayM(final F2<A, B, C
7070 *
7171 * @return This function promoted to transform Promises.
7272 */
73- static public <A , B , C > F2 <Promise <A >, Promise <B >, Promise <C >> promiseM (final F2 <A , B , C > f ) {
73+ public static <A , B , C > F2 <Promise <A >, Promise <B >, Promise <C >> promiseM (final F2 <A , B , C > f ) {
7474 return (a , b ) -> a .bind (b , curry (f ));
7575 }
7676
@@ -79,7 +79,7 @@ static public <A, B, C> F2<Promise<A>, Promise<B>, Promise<C>> promiseM(final F2
7979 *
8080 * @return This function promoted to transform Iterables.
8181 */
82- static public <A , B , C > F2 <Iterable <A >, Iterable <B >, IterableW <C >> iterableM (final F2 <A , B , C > f ) {
82+ public static <A , B , C > F2 <Iterable <A >, Iterable <B >, IterableW <C >> iterableM (final F2 <A , B , C > f ) {
8383 return (a , b ) -> IterableW .liftM2 (curry (f )).f (a ).f (b );
8484 }
8585
@@ -88,7 +88,7 @@ static public <A, B, C> F2<Iterable<A>, Iterable<B>, IterableW<C>> iterableM(fin
8888 *
8989 * @return This function promoted to transform Lists.
9090 */
91- static public <A , B , C > F2 <List <A >, List <B >, List <C >> listM (final F2 <A , B , C > f ) {
91+ public static <A , B , C > F2 <List <A >, List <B >, List <C >> listM (final F2 <A , B , C > f ) {
9292 return (a , b ) -> List .liftM2 (curry (f )).f (a ).f (b );
9393 }
9494
@@ -97,7 +97,7 @@ static public <A, B, C> F2<List<A>, List<B>, List<C>> listM(final F2<A, B, C> f)
9797 *
9898 * @return This function promoted to transform non-empty lists.
9999 */
100- static public <A , B , C > F2 <NonEmptyList <A >, NonEmptyList <B >, NonEmptyList <C >> nelM (final F2 <A , B , C > f ) {
100+ public static <A , B , C > F2 <NonEmptyList <A >, NonEmptyList <B >, NonEmptyList <C >> nelM (final F2 <A , B , C > f ) {
101101 return (as , bs ) -> NonEmptyList .fromList (as .toList ().bind (bs .toList (), f )).some ();
102102 }
103103
@@ -106,7 +106,7 @@ static public <A, B, C> F2<NonEmptyList<A>, NonEmptyList<B>, NonEmptyList<C>> ne
106106 *
107107 * @return This function promoted to transform Options.
108108 */
109- static public <A , B , C > F2 <Option <A >, Option <B >, Option <C >> optionM (final F2 <A , B , C > f ) {
109+ public static <A , B , C > F2 <Option <A >, Option <B >, Option <C >> optionM (final F2 <A , B , C > f ) {
110110 return (a , b ) -> Option .liftM2 (curry (f )).f (a ).f (b );
111111 }
112112
@@ -116,7 +116,7 @@ static public <A, B, C> F2<Option<A>, Option<B>, Option<C>> optionM(final F2<A,
116116 * @param o An ordering for the result of the promoted function.
117117 * @return This function promoted to transform Sets.
118118 */
119- static public <A , B , C > F2 <Set <A >, Set <B >, Set <C >> setM (final F2 <A , B , C > f , final Ord <C > o ) {
119+ public static <A , B , C > F2 <Set <A >, Set <B >, Set <C >> setM (final F2 <A , B , C > f , final Ord <C > o ) {
120120 return (as , bs ) -> {
121121 Set <C > cs = Set .empty (o );
122122 for (final A a : as )
@@ -131,7 +131,7 @@ static public <A, B, C> F2<Set<A>, Set<B>, Set<C>> setM(final F2<A, B, C> f, fin
131131 *
132132 * @return This function promoted to transform Streams.
133133 */
134- static public <A , B , C > F2 <Stream <A >, Stream <B >, Stream <C >> streamM (final F2 <A , B , C > f ) {
134+ public static <A , B , C > F2 <Stream <A >, Stream <B >, Stream <C >> streamM (final F2 <A , B , C > f ) {
135135 return (as , bs ) -> as .bind (bs , f );
136136 }
137137
@@ -140,7 +140,7 @@ static public <A, B, C> F2<Stream<A>, Stream<B>, Stream<C>> streamM(final F2<A,
140140 *
141141 * @return This function promoted to transform Trees.
142142 */
143- static public <A , B , C > F2 <Tree <A >, Tree <B >, Tree <C >> treeM (final F2 <A , B , C > f ) {
143+ public static <A , B , C > F2 <Tree <A >, Tree <B >, Tree <C >> treeM (final F2 <A , B , C > f ) {
144144 return new F2 <Tree <A >, Tree <B >, Tree <C >>() {
145145 public Tree <C > f (final Tree <A > as , final Tree <B > bs ) {
146146 final F2 <Tree <A >, Tree <B >, Tree <C >> self = this ;
@@ -154,7 +154,7 @@ public Tree<C> f(final Tree<A> as, final Tree<B> bs) {
154154 *
155155 * @return A function that zips two arrays with this function.
156156 */
157- static public <A , B , C > F2 <Array <A >, Array <B >, Array <C >> zipArrayM (final F2 <A , B , C > f ) {
157+ public static <A , B , C > F2 <Array <A >, Array <B >, Array <C >> zipArrayM (final F2 <A , B , C > f ) {
158158 return (as , bs ) -> as .zipWith (bs , f );
159159 }
160160
@@ -163,7 +163,7 @@ static public <A, B, C> F2<Array<A>, Array<B>, Array<C>> zipArrayM(final F2<A, B
163163 *
164164 * @return A function that zips two iterables with this function.
165165 */
166- static public <A , B , C > F2 <Iterable <A >, Iterable <B >, Iterable <C >> zipIterableM (final F2 <A , B , C > f ) {
166+ public static <A , B , C > F2 <Iterable <A >, Iterable <B >, Iterable <C >> zipIterableM (final F2 <A , B , C > f ) {
167167 return (as , bs ) -> wrap (as ).zipWith (bs , f );
168168 }
169169
@@ -172,7 +172,7 @@ static public <A, B, C> F2<Iterable<A>, Iterable<B>, Iterable<C>> zipIterableM(f
172172 *
173173 * @return A function that zips two lists with this function.
174174 */
175- static public <A , B , C > F2 <List <A >, List <B >, List <C >> zipListM (final F2 <A , B , C > f ) {
175+ public static <A , B , C > F2 <List <A >, List <B >, List <C >> zipListM (final F2 <A , B , C > f ) {
176176 return (as , bs ) -> as .zipWith (bs , f );
177177 }
178178
@@ -182,7 +182,7 @@ static public <A, B, C> F2<List<A>, List<B>, List<C>> zipListM(final F2<A, B, C>
182182 *
183183 * @return A function that zips two streams with this function.
184184 */
185- static public <A , B , C > F2 <Stream <A >, Stream <B >, Stream <C >> zipStreamM (final F2 <A , B , C > f ) {
185+ public static <A , B , C > F2 <Stream <A >, Stream <B >, Stream <C >> zipStreamM (final F2 <A , B , C > f ) {
186186 return (as , bs ) -> as .zipWith (bs , f );
187187 }
188188
@@ -191,7 +191,7 @@ static public <A, B, C> F2<Stream<A>, Stream<B>, Stream<C>> zipStreamM(final F2<
191191 *
192192 * @return A function that zips two non-empty lists with this function.
193193 */
194- static public <A , B , C > F2 <NonEmptyList <A >, NonEmptyList <B >, NonEmptyList <C >> zipNelM (final F2 <A , B , C > f ) {
194+ public static <A , B , C > F2 <NonEmptyList <A >, NonEmptyList <B >, NonEmptyList <C >> zipNelM (final F2 <A , B , C > f ) {
195195 return (as , bs ) -> NonEmptyList .fromList (as .toList ().zipWith (bs .toList (), f )).some ();
196196 }
197197
@@ -201,7 +201,7 @@ static public <A, B, C> F2<NonEmptyList<A>, NonEmptyList<B>, NonEmptyList<C>> zi
201201 * @param o An ordering for the resulting set.
202202 * @return A function that zips two sets with this function.
203203 */
204- static public <A , B , C > F2 <Set <A >, Set <B >, Set <C >> zipSetM (final F2 <A , B , C > f , final Ord <C > o ) {
204+ public static <A , B , C > F2 <Set <A >, Set <B >, Set <C >> zipSetM (final F2 <A , B , C > f , final Ord <C > o ) {
205205 return (as , bs ) -> iterableSet (o , as .toStream ().zipWith (bs .toStream (), f ));
206206 }
207207
@@ -211,7 +211,7 @@ static public <A, B, C> F2<Set<A>, Set<B>, Set<C>> zipSetM(final F2<A, B, C> f,
211211 *
212212 * @return A function that zips two trees with this function.
213213 */
214- static public <A , B , C > F2 <Tree <A >, Tree <B >, Tree <C >> zipTreeM (final F2 <A , B , C > f ) {
214+ public static <A , B , C > F2 <Tree <A >, Tree <B >, Tree <C >> zipTreeM (final F2 <A , B , C > f ) {
215215 return new F2 <Tree <A >, Tree <B >, Tree <C >>() {
216216 public Tree <C > f (final Tree <A > ta , final Tree <B > tb ) {
217217 final F2 <Tree <A >, Tree <B >, Tree <C >> self = this ;
@@ -226,7 +226,7 @@ public Tree<C> f(final Tree<A> ta, final Tree<B> tb) {
226226 *
227227 * @return A function that zips two zippers with this function.
228228 */
229- static public <A , B , C > F2 <Zipper <A >, Zipper <B >, Zipper <C >> zipZipperM (final F2 <A , B , C > f ) {
229+ public static <A , B , C > F2 <Zipper <A >, Zipper <B >, Zipper <C >> zipZipperM (final F2 <A , B , C > f ) {
230230 return (ta , tb ) -> {
231231 final F2 <Stream <A >, Stream <B >, Stream <C >> sf = zipStreamM (f );
232232 return zipper (sf .f (ta .lefts (), tb .lefts ()), f .f (ta .focus (), tb .focus ()), sf .f (ta .rights (), tb .rights ()));
@@ -239,7 +239,7 @@ static public <A, B, C> F2<Zipper<A>, Zipper<B>, Zipper<C>> zipZipperM(final F2<
239239 *
240240 * @return A function that zips two TreeZippers with this function.
241241 */
242- static public <A , B , C > F2 <TreeZipper <A >, TreeZipper <B >, TreeZipper <C >> zipTreeZipperM (final F2 <A , B , C > f ) {
242+ public static <A , B , C > F2 <TreeZipper <A >, TreeZipper <B >, TreeZipper <C >> zipTreeZipperM (final F2 <A , B , C > f ) {
243243 return (ta , tb ) -> {
244244 final F2 <Stream <Tree <A >>, Stream <Tree <B >>, Stream <Tree <C >>> sf = zipStreamM (treeM (f ));
245245 final
@@ -254,19 +254,19 @@ static public <A, B, C> F2<TreeZipper<A>, TreeZipper<B>, TreeZipper<C>> zipTreeZ
254254 };
255255 }
256256
257- static public <A , B , C , Z > F2 <Z , B , C > contramapFirst (F2 <A , B , C > target , F <Z , A > f ) {
257+ public static <A , B , C , Z > F2 <Z , B , C > contramapFirst (F2 <A , B , C > target , F <Z , A > f ) {
258258 return (z , b ) -> target .f (f .f (z ), b );
259259 }
260260
261- static public <A , B , C , Z > F2 <A , Z , C > contramapSecond (F2 <A , B , C > target , F <Z , B > f ) {
261+ public static <A , B , C , Z > F2 <A , Z , C > contramapSecond (F2 <A , B , C > target , F <Z , B > f ) {
262262 return (a , z ) -> target .f (a , f .f (z ));
263263 }
264264
265- static public <A , B , C , X , Y > F2 <X , Y , C > contramap (F2 <A , B , C > target , F <X , A > f , F <Y , B > g ) {
265+ public static <A , B , C , X , Y > F2 <X , Y , C > contramap (F2 <A , B , C > target , F <X , A > f , F <Y , B > g ) {
266266 return contramapSecond (contramapFirst (target , f ), g );
267267 }
268268
269- static public <A , B , C , Z > F2 <A , B , Z > map (F2 <A , B , C > target , F <C , Z > f ) {
269+ public static <A , B , C , Z > F2 <A , B , Z > map (F2 <A , B , C > target , F <C , Z > f ) {
270270 return (a , b ) -> f .f (target .f (a , b ));
271271 }
272272
0 commit comments