Higher Order Lab

  Richard Warburton
     Stuart Marks
   Maurice Naftalin
    Graham Allan
     John Oliver
Why are we here?

● Learn about lambda expressions and
  collections

● Feedback on the new API

● Have fun
What's on the USB Stick?
● OpenJDK binaries with lambda support
  ○ Windows
  ○ Mac
  ○ Linux


● Javadoc for the new API

● IDEs with Support
  ○ Idea
  ○ Netbeans
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
Who's Who
Instructors: put up your hands!
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))
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
Any Questions?
     Feedback @ bit.ly/14iINWi

github.com/AdoptOpenJDK/Lambdas

Devoxx uk lambdas hackday

  • 1.
    Higher Order Lab Richard Warburton Stuart Marks Maurice Naftalin Graham Allan John Oliver
  • 2.
    Why are wehere? ● Learn about lambda expressions and collections ● Feedback on the new API ● Have fun
  • 3.
    What's on theUSB Stick? ● OpenJDK binaries with lambda support ○ Windows ○ Mac ○ Linux ● Javadoc for the new API ● IDEs with Support ○ Idea ○ Netbeans
  • 4.
    Expectations ● You havea 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
  • 5.
  • 6.
    What should wefocus 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: ● Sorta 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