Skip to content

Commit

Permalink
Revert Seq prepend optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmcclean committed Jun 19, 2019
1 parent 950cff9 commit 57312e9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cyclops/src/main/java/cyclops/data/Seq.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,7 @@ default Seq<T> prepend(T value){
return Cons.cons(value,this);
}
default Seq<T> prependAll(Iterable<? extends T> it){
Seq<T> res = this;
for(T next : it){
res = res.prepend(next);
}
return res;
return (Seq<T>)ImmutableList.super.prependAll(it);
}

default Seq<T> take(final long num) {
Expand Down Expand Up @@ -1096,7 +1092,7 @@ public <R> R foldSeq(Function<? super Cons<T>, ? extends R> fn1, Function<? supe

@Override
public Seq<T> plusAll(Iterable<? extends T> t) {
return prependAll(t);
return fromIterable((Iterable<T>)t);
}

@Override
Expand Down

0 comments on commit 57312e9

Please sign in to comment.