@Override default <U> Seq<U> scanRight(U zero, BiFunction<? super T, ? super U, ? extends U> operation) { Objects.requireNonNull(operation, "operation is null"); return Collections.scanRight( this, zero, operation, List.empty(), List::prepend, Function.identity()); }
@Override public <U> Array<U> scanRight(U zero, BiFunction<? super T, ? super U, ? extends U> operation) { Objects.requireNonNull(operation, "operation is null"); return Collections.scanRight( this, zero, operation, List.empty(), List::prepend, list -> Array.wrap(list.toJavaArray())); }