DevoxxUK Lambdas Lab (original) (raw)

Richard Warburton richard.warburton at gmail.com
Thu Apr 4 02:04:30 PDT 2013


Stream s = Arrays.asList(1, 2, 3, 4).stream(); IntStream is = s.mapToInt(Integer::intValue); Things have been moving fast so i don't know if the lambda build you used had the overloaded map methods or map/mapToInt etc.

We were using b82, which has a map function with overloads on primitive Functional Interfaces.

Thanks for clarifying the correct idiom. For the record I saw several people do something like:

ToDoubleFunction toDouble = d -> (double) d; DoubleStream ds = s.map(toDouble);

regards,

Richard Warburton

http://insightfullogic.com @RichardWarburto <http://twitter.com/richardwarburto>



More information about the lambda-dev mailing list