Skip to content

Commit 8ceeb22

Browse files
committed
Update Option_filter.java
Corrections for few small mistakes in the Java8 Option filter example.
1 parent 071190f commit 8ceeb22

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

demo/src/main/java/fj/demo/Option_filter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ public static void main(final String[] args) {
1919
final Option<Integer> o6 = o3.filter(even);
2020

2121
F<Integer, Boolean> f = i -> i % 2 == 0;
22-
final Option<Integer> o7 = o1.filter(f);
23-
final Option<Integer> o8 = o1.filter(f);
24-
final Option<Integer> o9 = o1.filter(i -> i % 2 == 0);
22+
final Option<Integer> o7 = o4.filter(f);
23+
final Option<Integer> o8 = o5.filter(f);
24+
final Option<Integer> o9 = o6.filter(i -> i % 2 == 0);
2525

2626
optionShow(intShow).println(o4); // None
2727
optionShow(intShow).println(o5); // None
28-
optionShow(intShow).println(o6); // Some(8)
28+
optionShow(intShow).println(o6); // Some(4)
2929
}
3030
}

0 commit comments

Comments
 (0)