Skip to content

Commit 3cd3a4b

Browse files
committed
functionaljava#210 Make Array.ImmutableProjection static
1 parent 4eb7e9e commit 3cd3a4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/main/java/fj/data/Array.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ public <B> Array<B> scanLeft(final F2<B, A, B> f, final B b) {
348348
public Array<A> scanLeft1(final F<A, F<A, A>> f) {
349349
final Object[] bs = new Object[a.length];
350350
A x = get(0);
351-
bs[0] = x;
351+
bs[0] = x;
352352

353353
for (int i = 1; i < a.length; i++) {
354354
x = f.f(x).f((A) a[i]);
@@ -417,7 +417,7 @@ public <B> Array<B> scanRight(final F2<A, B, B> f, final B b) {
417417
public Array<A> scanRight1(final F<A, F<A, A>>f) {
418418
final Object[] bs = new Object[a.length];
419419
A x = get(length() - 1);
420-
bs[length() - 1] = x;
420+
bs[length() - 1] = x;
421421

422422
for (int i = a.length - 2; i >= 0; i--) {
423423
x = f.f((A) a[i]).f(x);
@@ -827,7 +827,7 @@ public static <A, B> P2<Array<A>, Array<B>> unzip(final Array<P2<A, B>> xs) {
827827
/**
828828
* Projects an array by providing only operations which do not mutate.
829829
*/
830-
public final class ImmutableProjection<A> implements Iterable<A> {
830+
public static final class ImmutableProjection<A> implements Iterable<A> {
831831
private final Array<A> a;
832832

833833
private ImmutableProjection(final Array<A> a) {

0 commit comments

Comments
 (0)