File tree Expand file tree Collapse file tree 6 files changed +6
-25
lines changed
core/src/main/java/fj/data/vector Expand file tree Collapse file tree 6 files changed +6
-25
lines changed Original file line number Diff line number Diff line change @@ -201,11 +201,7 @@ public NonEmptyList<A> toNonEmptyList() {
201201 * @return a stream of the elements of this vector.
202202 */
203203 public Stream <A > toStream () {
204- return Stream .cons (head ()._1 (), new P1 <Stream <A >>() {
205- public Stream <A > _1 () {
206- return tail ().toStream ();
207- }
208- });
204+ return Stream .cons (head ()._1 (), () -> tail ().toStream ());
209205 }
210206
211207 /**
Original file line number Diff line number Diff line change @@ -160,11 +160,7 @@ public NonEmptyList<A> toNonEmptyList() {
160160 * @return a stream of the elements of this vector.
161161 */
162162 public Stream <A > toStream () {
163- return Stream .cons (head ._1 (), new P1 <Stream <A >>() {
164- public Stream <A > _1 () {
165- return tail .toStream ();
166- }
167- });
163+ return Stream .cons (head ._1 (), () -> tail .toStream ());
168164 }
169165
170166 /**
Original file line number Diff line number Diff line change @@ -177,11 +177,7 @@ public NonEmptyList<A> toNonEmptyList() {
177177 * @return a stream of the elements of this vector.
178178 */
179179 public Stream <A > toStream () {
180- return Stream .cons (head ._1 (), new P1 <Stream <A >>() {
181- public Stream <A > _1 () {
182- return tail .toStream ();
183- }
184- });
180+ return Stream .cons (head ._1 (), () -> tail .toStream ());
185181 }
186182
187183 /**
Original file line number Diff line number Diff line change @@ -194,11 +194,7 @@ public NonEmptyList<A> toNonEmptyList() {
194194 * @return a stream of the elements of this vector.
195195 */
196196 public Stream <A > toStream () {
197- return Stream .cons (head ._1 (), new P1 <Stream <A >>() {
198- public Stream <A > _1 () {
199- return tail .toStream ();
200- }
201- });
197+ return Stream .cons (head ._1 (), () -> tail .toStream ());
202198 }
203199
204200 /**
Original file line number Diff line number Diff line change @@ -211,11 +211,7 @@ public NonEmptyList<A> toNonEmptyList() {
211211 * @return a stream of the elements of this vector.
212212 */
213213 public Stream <A > toStream () {
214- return Stream .cons (head ._1 (), new P1 <Stream <A >>() {
215- public Stream <A > _1 () {
216- return tail .toStream ();
217- }
218- });
214+ return Stream .cons (head ._1 (), () -> tail .toStream ());
219215 }
220216
221217 /**
Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ public NonEmptyList<A> toNonEmptyList() {
229229 */
230230 public Stream <A > toStream () {
231231 return Stream .cons (head ._1 (), new P1 <Stream <A >>() {
232+ F0 <Stream <A >> f = 100 ;
232233 public Stream <A > _1 () {
233234 return tail .toStream ();
234235 }
You can’t perform that action at this time.
0 commit comments