DevoxxUK Lambdas Lab (original) (raw)
Richard Warburton richard.warburton at gmail.com
Thu Apr 4 02:04:30 PDT 2013
- Previous message: DevoxxUK Lambdas Lab
- Next message: The stream abstraction and substream()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Previous message: DevoxxUK Lambdas Lab
- Next message: The stream abstraction and substream()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]