Skip to content

Commit

Permalink
refactored CharSeq.scan to return CharSeq
Browse files Browse the repository at this point in the history
  • Loading branch information
ashrwin committed Nov 17, 2016
1 parent 827bcf7 commit b6cc582
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion javaslang/src/main/java/javaslang/collection/CharSeq.java
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ public CharSeq reverse() {

@Override
public IndexedSeq<Character> scan(Character zero, BiFunction<? super Character, ? super Character, ? extends Character> operation) {
return scanLeft(zero, operation);
return Collections.scanLeft(this, zero, operation, Iterator::toCharSeq);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,6 @@ public PriorityQueue<T> scan(T zero, BiFunction<? super T, ? super T, ? extends
@Override
public <U> PriorityQueue<U> scanLeft(U zero, BiFunction<? super U, ? super T, ? extends U> operation) {
Objects.requireNonNull(operation, "operation is null");

return Collections.scanLeft(this, zero, operation, it -> ofAll(naturalComparator(), it));
}

Expand Down

0 comments on commit b6cc582

Please sign in to comment.