We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce a new collect operator that allow to collect the items produced by a channel into list object.
collect
The collect operator has the following advantages over the existing toList object.
toList
Collect#collect
Examples:
Channel .from( 1, 2, 3, 4 ) .collect() .println() # outputs [1,2,3,4]
The following example shows how use a mapper closure:
Channel .from( 'hello', 'ciao', 'bonjour' ) .collect { it.length() } .println() # outputs [5,4,7]
The text was updated successfully, but these errors were encountered:
New collect operator #297
d978d5d
eaa738c
Included in version 0.24.0
Sorry, something went wrong.
No branches or pull requests
Introduce a new
collect
operator that allow to collect the items produced by a channel into list object.The
collect
operator has the following advantages over the existingtoList
object.Collect#collect
Groovy method.Examples:
The following example shows how use a mapper closure:
The text was updated successfully, but these errors were encountered: