@@ -75,7 +75,7 @@ public void testBind1() {
7575 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
7676 list .map (List ::single ) :
7777 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
78- .forEach (list -> {
78+ .foreachDoEffect (list -> {
7979 assertEquals (iif (list .forall (Option ::isSome ), 0 ), list .index (0 ).bind (Option ::some ));
8080 });
8181
@@ -87,7 +87,7 @@ public void testBind2() {
8787 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
8888 list .map (List ::single ) :
8989 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
90- .forEach (list -> {
90+ .foreachDoEffect (list -> {
9191 assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 )), list .index (0 ).bind (list .index (1 ), p2 ()));
9292 });
9393 }
@@ -98,7 +98,7 @@ public void testBind3() {
9898 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
9999 list .map (List ::single ) :
100100 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
101- .forEach (list -> {
101+ .foreachDoEffect (list -> {
102102 assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 )), list .index (0 ).bind (list .index (1 ), list .index (2 ), p3 ()));
103103 });
104104
@@ -110,7 +110,7 @@ public void testBind4() {
110110 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
111111 list .map (List ::single ) :
112112 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
113- .forEach (list -> {
113+ .foreachDoEffect (list -> {
114114 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 ()));
115115 });
116116
@@ -122,7 +122,7 @@ public void testBind5() {
122122 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
123123 list .map (List ::single ) :
124124 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
125- .forEach (list -> {
125+ .foreachDoEffect (list -> {
126126 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 ()));
127127 });
128128 }
@@ -133,7 +133,7 @@ public void testBind6() {
133133 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
134134 list .map (List ::single ) :
135135 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
136- .forEach (list -> {
136+ .foreachDoEffect (list -> {
137137 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 ()));
138138 });
139139 }
@@ -144,7 +144,7 @@ public void testBind7() {
144144 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
145145 list .map (List ::single ) :
146146 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
147- .forEach (list -> {
147+ .foreachDoEffect (list -> {
148148 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 ()));
149149 });
150150 }
@@ -155,7 +155,7 @@ public void testBind8() {
155155 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
156156 list .map (List ::single ) :
157157 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
158- .forEach (list -> {
158+ .foreachDoEffect (list -> {
159159 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 ()));
160160 });
161161 }
@@ -166,7 +166,7 @@ public void testBindProduct2() {
166166 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
167167 list .map (List ::single ) :
168168 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
169- .forEach (list -> {
169+ .foreachDoEffect (list -> {
170170 assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 )), list .index (0 ).bindProduct (list .index (1 )));
171171 });
172172 }
@@ -177,7 +177,7 @@ public void testBindProduct3() {
177177 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
178178 list .map (List ::single ) :
179179 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
180- .forEach (list -> {
180+ .foreachDoEffect (list -> {
181181 assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 )), list .index (0 ).bindProduct (list .index (1 ), list .index (2 )));
182182 });
183183
@@ -189,7 +189,7 @@ public void testBindProduct4() {
189189 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
190190 list .map (List ::single ) :
191191 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
192- .forEach (list -> {
192+ .foreachDoEffect (list -> {
193193 assertEquals (iif (list .forall (Option ::isSome ), p (0 , 1 , 2 , 3 )), list .index (0 ).bindProduct (list .index (1 ), list .index (2 ), list .index (3 )));
194194 });
195195
@@ -201,7 +201,7 @@ public void testBindProduct5() {
201201 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
202202 list .map (List ::single ) :
203203 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
204- .forEach (list -> {
204+ .foreachDoEffect (list -> {
205205 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 )));
206206 });
207207 }
@@ -212,7 +212,7 @@ public void testBindProduct6() {
212212 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
213213 list .map (List ::single ) :
214214 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
215- .forEach (list -> {
215+ .foreachDoEffect (list -> {
216216 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 )));
217217 });
218218 }
@@ -223,7 +223,7 @@ public void testBindProduct7() {
223223 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
224224 list .map (List ::single ) :
225225 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
226- .forEach (list -> {
226+ .foreachDoEffect (list -> {
227227 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 )));
228228 });
229229 }
@@ -234,7 +234,7 @@ public void testBindProduct8() {
234234 .foldLeft (accumulator -> list -> accumulator .isEmpty () ?
235235 list .map (List ::single ) :
236236 accumulator .bind (accumulatorElement -> list .map (accumulatorElement ::snoc )), List .<List <Option <Integer >>>nil ())
237- .forEach (list -> {
237+ .foreachDoEffect (list -> {
238238 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 )));
239239 });
240240 }
0 commit comments