feat: add Sequence.list method to collect elements into a new List
Implements a new `list` method on the Sequence class that iterates over all elements and returns them as a freshly created List object. Includes documentation with usage example and a test case using a custom TestSequence class to verify correct behavior.
This commit is contained in:
@@ -65,6 +65,13 @@ It is a runtime error if `sep` is not a string.
|
||||
|
||||
Calls `join` with the empty string as the separator.
|
||||
|
||||
### **list**
|
||||
|
||||
Creates a [list](list.html) containing all the elements in the sequence.
|
||||
|
||||
:::dart
|
||||
(1..3).list // [1, 2, 3]
|
||||
|
||||
### **map**(transformation)
|
||||
|
||||
Creates a new list by applying `transformation` to each element in the
|
||||
|
||||
Reference in New Issue
Block a user