more Java 8 examples:
updated Function examples
added examples of Optional
replaced lambda expressions with method references where possible