Skip to content

Commit e4a7cad

Browse files
committed
Converted consume module to use lambdas
1 parent 5241e26 commit e4a7cad

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package fj.consume.euler;
22

3-
import fj.F;
4-
import fj.data.Stream;
5-
63
import static fj.data.List.range;
74
import static fj.function.Integers.sum;
85

@@ -14,13 +11,11 @@
1411
public class Problem1 {
1512

1613
public static void main(final String[] args) {
17-
java7();
14+
calc();
1815
}
1916

20-
public static void java7() {
21-
out.println(sum(range(0, 1000).filter(new F<Integer, Boolean>() {
22-
public Boolean f(final Integer a) { return a % 3 == 0 || a % 5 == 0;}
23-
})));
17+
public static void calc() {
18+
out.println(sum(range(0, 1000).filter(a -> a % 3 == 0 || a % 5 == 0)));
2419
}
2520

2621
}

0 commit comments

Comments
 (0)