This document outlines an agenda for a higher order lab focusing on lambda expressions and collections in Java 8. The lab will provide OpenJDK binaries, Javadoc, and IDE support for working with the new API. Attendees are expected to have basic knowledge of lambdas and functional programming concepts. The lab will demonstrate revamped collection methods like flatMap and reduce, and changes to existing methods. Exercise ideas are provided to sort and filter collections, count words in documents, and implement common functions. Attendees are invited to provide feedback.
1 of 8
Download to read offline
1
2
3
4
5
6
7
8
More Related Content
Devoxx uk lambdas hackday
1. Higher Order Lab
Richard Warburton
Stuart Marks
Maurice Naftalin
Graham Allan
John Oliver
2. Why are we here?
● Learn about lambda expressions and
collections
● Feedback on the new API
● Have fun
3. What's on the USB Stick?
● OpenJDK binaries with lambda support
○ Windows
○ Mac
○ Linux
● Javadoc for the new API
● IDEs with Support
○ Idea
○ Netbeans
4. Expectations
● You have a laptop
○ or a friend with a laptop!
● You've been to a lambdas talk ...
○ "Lambdas and Collections in Java 8"
○ "Accelerated Lambda Programming"
● ... or you know the basics already
6. What should we focus on
● At first just write the basics
● Revamped collections methods
○ flatMap()
○ reduce()
● Collect Changes:
○ into(new ArrayList<>()) => collect(toList())
○ groupBy(classifier) => collect(groupingBy(classifier))
7. Exercise Ideas:
● Sort a list of strings alphabetically within
length.
● Count number of words in a document
○ http://www.gutenberg.org
● Implement 'sum' and 'average' of command-
line arguments
● Count word frequency in a document
○ maybe without loading the entire document into
memory?
● Feedback @ bit.ly/14iINWi
● github.com/AdoptOpenJDK/Lambdas
8. Any Questions?
Feedback @ bit.ly/14iINWi
github.com/AdoptOpenJDK/Lambdas