Skip to content

Commit

Permalink
bug fix for scanLeft / slice
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmcclean committed Oct 29, 2015
1 parent 13e4364 commit 3ddcc8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ default Tuple2<LazyFutureStream<U>, LazyFutureStream<U>> partitionFutureStream(
@Override
default LazyFutureStream<U> slice(long from, long to) {

return fromStream(fromStream(SequenceM.fromStream(toQueue().stream(getSubscription()))
return fromStream(SequenceM.fromStream(toQueue().stream(getSubscription())
.slice(from, to)));
}

Expand Down Expand Up @@ -1634,7 +1634,7 @@ default <T, R> LazyFutureStream<R> zip(Seq<T> other,
@Override
default <T> LazyFutureStream<T> scanLeft(T seed,
BiFunction<T, ? super U, T> function) {
return fromStream(fromStream(SequenceM.fromStream(toQueue().stream(getSubscription())).scanLeft(seed, function)));
return fromStream(SequenceM.fromStream(toQueue().stream(getSubscription())).scanLeft(seed, function));

}

Expand All @@ -1649,7 +1649,7 @@ default <T> LazyFutureStream<T> scanLeft(T seed,
@Override
default <R> LazyFutureStream<R> scanRight(R seed,
BiFunction<? super U, R, R> function) {
return fromStream(fromStream(SequenceM.fromStream(toQueue().stream(getSubscription())).scanRight(seed, function)));
return fromStream(SequenceM.fromStream(toQueue().stream(getSubscription())).scanRight(seed, function));

}

Expand Down
1 change: 1 addition & 0 deletions src/test/java/com/aol/simple/react/base/BaseSeqTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ public void limitWhileTest(){

@Test
public void testScanLeftStringConcat() {

assertThat(of("a", "b", "c").scanLeft("", String::concat).toList().size(),
is(4));
}
Expand Down

0 comments on commit 3ddcc8c

Please sign in to comment.