Functional additions to the Java and Scala standard libraries