Daniel Sun created GROOVY-8899: ---------------------------------- Summary: Add DGSM `first` and `last` Key: GROOVY-8899 URL: https://issues.apache.org/jira/browse/GROOVY-8899 Project: Groovy Issue Type: Improvement Reporter: Daniel Sun Assignee: Daniel Sun Fix For: 3.0.0-alpha-4
{code:java} void testFirst() { assert 2 == Stream.of(2, 3, 6, 5).collect(Collectors.first()).get() } void testLast() { assert 5 == Stream.of(2, 3, 6, 5).collect(Collectors.last()).get() } {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)