I am trying to do what seems to be a relatively basic thing in the new JDK 8 land of functional programming, but I can\'t get it to work. I have this working code:
I ran into this same issue and was able to solve it by explicitly specifying the generic type-parameter to map like so:
map
List> checks = l.stream(). >map(n -> () -> { System.out.println(n); return null; }). collect(Collectors.toList());