You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2022/06/29 10:30:00 UTC
[jira] [Updated] (GROOVY-10672) Provide a stream take method taking an IntRange
|  |
[Paul King](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=paulk)
**updated** an issue
---|---
|
---
| [Groovy](https://issues.apache.org/jira/browse/GROOVY) /
[](https://issues.apache.org/jira/browse/GROOVY-10672)
[GROOVY-10672](https://issues.apache.org/jira/browse/GROOVY-10672)
---
[Provide a stream take method taking an
IntRange](https://issues.apache.org/jira/browse/GROOVY-10672)
| Change By: | [Paul
King](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=paulk)
---|---
| {code}
Stream<String> stream = ['foo','bar','baz'].stream()
assert stream.take(0<..<2).map(String::toUpperCase).toList() == ['BAR']
{code}
---
| | [ 
](https://issues.apache.org/jira/browse/GROOVY-10672#add-comment "Add
Comment") | [Add
Comment](https://issues.apache.org/jira/browse/GROOVY-10672#add-comment "Add
Comment")
---|---
| This message was sent by Atlassian Jira (v8.20.10#820010-sha1:ace47f9) | |

---