Currently, there is a take method on collections that returns the first N items in a collection. Other languages such as scala and haskell also provide a takeWhile method, that is similar. Instead of taking a fixed number of items, it takes items until a condition, in the form of a closure, is met.
|Summary||Collections could benefit from a takeWhile method||Groovy could benefit from DGM takeWhile and dropWhile methods|
|Assignee||Paul King [ paulk ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Fix Version/s||2.0-beta-3 [ 18244 ]|
|Fix Version/s||1.8.7 [ 18317 ]|
|Resolution||Fixed [ 1 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|