@@ -161,49 +161,43 @@ public static <T1, T2, T3, T4, R> Ix<R> zip(
161161 return new IxZip4 <T1 , T2 , T3 , T4 , R >(it1 , it2 , it3 , it4 , zipper );
162162 }
163163
164- public static <T > Ix <T > repeat (T value ) {
165- // TODO implement
166- throw new UnsupportedOperationException ();
164+ public static <T > Ix <T > repeatValue (T value ) {
165+ return new IxRepeat <T >(value );
167166 }
168167
169- public static <T > Ix <T > repeat (T value , long count ) {
170- // TODO implement
171- throw new UnsupportedOperationException ();
168+ public static <T > Ix <T > repeatValue (T value , long count ) {
169+ return new IxRepeatCount <T >(value , count );
172170 }
173171
174- public static <T > Ix <T > repeat (T value , Pred0 stopPredicate ) {
175- // TODO implement
176- throw new UnsupportedOperationException ();
172+ public static <T > Ix <T > repeatValue (T value , Pred0 stopPredicate ) {
173+ return new IxRepeatPredicate <T >(value , stopPredicate );
177174 }
178175
179- public static <T > Ix <T > forloop (T seed , Pred <? super T > condition , Func1 <? super T , ? extends T > next ) {
180- // TODO implement
181- throw new UnsupportedOperationException ();
176+ public static <T , R > Ix <R > forloop (T seed , Pred <? super T > condition ,
177+ Func1 <? super T , ? extends T > next ,
178+ Func1 <? super T , ? extends R > selector ) {
179+ return new IxForloop <T , R >(seed , condition , selector , next );
182180 }
183181
184182 //---------------------------------------------------------------------------------------
185183 // Instance operators
186184 //---------------------------------------------------------------------------------------
187185
188186 public final <R > R as (Func1 <? super Ix <T >, R > transformer ) {
189- // TODO implement
190- throw new UnsupportedOperationException ();
187+ return transformer .call (this );
191188 }
192189
193190 public final <R > Ix <R > compose (Func1 <? super Ix <T >, ? extends Iterable <? extends R >> transformer ) {
194- // TODO implement
195- throw new UnsupportedOperationException ();
191+ return new IxCompose <T , R >(this , transformer );
196192 }
197193
198194 public final Ix <Boolean > any (Pred <? super T > predicate ) {
199- // TODO implement
200- throw new UnsupportedOperationException ();
195+ return new IxAny <T >(this , predicate );
201196 }
202197
203198
204199 public final Ix <Boolean > all (Pred <? super T > predicate ) {
205- // TODO implement
206- throw new UnsupportedOperationException ();
200+ return new IxAll <T >(this , predicate );
207201 }
208202
209203 public final Ix <Boolean > hasElements () {
0 commit comments