@@ -75,7 +75,7 @@ public void testBind1() {
75
75
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
76
76
list .map (List ::single ) :
77
77
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
78
- .forEach (list -> {
78
+ .foreachDoEffect (list -> {
79
79
assertEquals (iif (list .forall (Option ::isSome ), 0 ), list .index (0 ).bind (Option ::some ));
80
80
});
81
81
@@ -87,7 +87,7 @@ public void testBind2() {
87
87
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
88
88
list .map (List ::single ) :
89
89
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
90
- .forEach (list -> {
90
+ .foreachDoEffect (list -> {
91
91
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 )), list .index (0 ).bind (list .index (1 ), p2 ()));
92
92
});
93
93
}
@@ -98,7 +98,7 @@ public void testBind3() {
98
98
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
99
99
list .map (List ::single ) :
100
100
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
101
- .forEach (list -> {
101
+ .foreachDoEffect (list -> {
102
102
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 )), list .index (0 ).bind (list .index (1 ), list .index (2 ), p3 ()));
103
103
});
104
104
@@ -110,7 +110,7 @@ public void testBind4() {
110
110
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
111
111
list .map (List ::single ) :
112
112
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
113
- .forEach (list -> {
113
+ .foreachDoEffect (list -> {
114
114
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 )), list .index (0 ).bind (list .index (1 ), list .index (2 ), list .index (3 ), p4 ()));
115
115
});
116
116
@@ -122,7 +122,7 @@ public void testBind5() {
122
122
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
123
123
list .map (List ::single ) :
124
124
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
125
- .forEach (list -> {
125
+ .foreachDoEffect (list -> {
126
126
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 , 4 )), list .index (0 ).bind (list .index (1 ), list .index (2 ), list .index (3 ), list .index (4 ), p5 ()));
127
127
});
128
128
}
@@ -133,7 +133,7 @@ public void testBind6() {
133
133
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
134
134
list .map (List ::single ) :
135
135
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
136
- .forEach (list -> {
136
+ .foreachDoEffect (list -> {
137
137
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 , 4 , 5 )), list .index (0 ).bind (list .index (1 ), list .index (2 ), list .index (3 ), list .index (4 ), list .index (5 ), p6 ()));
138
138
});
139
139
}
@@ -144,7 +144,7 @@ public void testBind7() {
144
144
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
145
145
list .map (List ::single ) :
146
146
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
147
- .forEach (list -> {
147
+ .foreachDoEffect (list -> {
148
148
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 , 4 , 5 , 6 )), list .index (0 ).bind (list .index (1 ), list .index (2 ), list .index (3 ), list .index (4 ), list .index (5 ), list .index (6 ), p7 ()));
149
149
});
150
150
}
@@ -155,7 +155,7 @@ public void testBind8() {
155
155
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
156
156
list .map (List ::single ) :
157
157
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
158
- .forEach (list -> {
158
+ .foreachDoEffect (list -> {
159
159
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 )), list .index (0 ).bind (list .index (1 ), list .index (2 ), list .index (3 ), list .index (4 ), list .index (5 ), list .index (6 ), list .index (7 ), P .<Integer , Integer , Integer , Integer , Integer , Integer , Integer , Integer >p8 ()));
160
160
});
161
161
}
@@ -166,7 +166,7 @@ public void testBindProduct2() {
166
166
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
167
167
list .map (List ::single ) :
168
168
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
169
- .forEach (list -> {
169
+ .foreachDoEffect (list -> {
170
170
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 )), list .index (0 ).bindProduct (list .index (1 )));
171
171
});
172
172
}
@@ -177,7 +177,7 @@ public void testBindProduct3() {
177
177
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
178
178
list .map (List ::single ) :
179
179
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
180
- .forEach (list -> {
180
+ .foreachDoEffect (list -> {
181
181
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 )), list .index (0 ).bindProduct (list .index (1 ), list .index (2 )));
182
182
});
183
183
@@ -189,7 +189,7 @@ public void testBindProduct4() {
189
189
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
190
190
list .map (List ::single ) :
191
191
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
192
- .forEach (list -> {
192
+ .foreachDoEffect (list -> {
193
193
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 )), list .index (0 ).bindProduct (list .index (1 ), list .index (2 ), list .index (3 )));
194
194
});
195
195
@@ -201,7 +201,7 @@ public void testBindProduct5() {
201
201
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
202
202
list .map (List ::single ) :
203
203
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
204
- .forEach (list -> {
204
+ .foreachDoEffect (list -> {
205
205
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 , 4 )), list .index (0 ).bindProduct (list .index (1 ), list .index (2 ), list .index (3 ), list .index (4 )));
206
206
});
207
207
}
@@ -212,7 +212,7 @@ public void testBindProduct6() {
212
212
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
213
213
list .map (List ::single ) :
214
214
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
215
- .forEach (list -> {
215
+ .foreachDoEffect (list -> {
216
216
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 , 4 , 5 )), list .index (0 ).bindProduct (list .index (1 ), list .index (2 ), list .index (3 ), list .index (4 ), list .index (5 )));
217
217
});
218
218
}
@@ -223,7 +223,7 @@ public void testBindProduct7() {
223
223
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
224
224
list .map (List ::single ) :
225
225
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
226
- .forEach (list -> {
226
+ .foreachDoEffect (list -> {
227
227
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 , 4 , 5 , 6 )), list .index (0 ).bindProduct (list .index (1 ), list .index (2 ), list .index (3 ), list .index (4 ), list .index (5 ), list .index (6 )));
228
228
});
229
229
}
@@ -234,7 +234,7 @@ public void testBindProduct8() {
234
234
.foldLeft (accumulator -> list -> accumulator .isEmpty () ?
235
235
list .map (List ::single ) :
236
236
accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
237
- .forEach (list -> {
237
+ .foreachDoEffect (list -> {
238
238
assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 )), list .index (0 ).bindProduct (list .index (1 ), list .index (2 ), list .index (3 ), list .index (4 ), list .index (5 ), list .index (6 ), list .index (7 )));
239
239
});
240
240
}
0 commit comments