Functional iteration patterns for Java