Skip to content

Commit

Permalink
Merge pull request #1063 from aol/revertSeqPrepend
Browse files Browse the repository at this point in the history
Revert Seq prepend optimizations
  • Loading branch information
johnmcclean authored Jun 19, 2019
2 parents 950cff9 + 57312e9 commit 3520c0b
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 3520c0b

Please sign in to comment.