toList

List of elements of a structure, from left to right. If the entire list is intended to be reduced via a fold, just fold the structure directly bypassing the list.

Examples

Basic usage:
>>> toList Nothing
[]
>>> toList (Just 42)
[42]
>>> toList (Left "foo")
[]
>>> toList (Node (Leaf 5) 17 (Node Empty 12 (Leaf 8)))
[5,17,12,8]
For lists, toList is the identity:
>>> toList [1, 2, 3]
[1,2,3]
Convert a stream to a normal list efficiently.
The toList function extracts a list of Item l from the structure l. It should satisfy fromList . toList = id.
Convert an immutable array to a list.
Convert the map to a list of key/value pairs. Subject to list fusion.
toList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
toList empty == []
Convert the set to a list of elements. Subject to list fusion.
Convert the map to a list of key/value pairs. Subject to list fusion.
toList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
toList empty == []
Convert the set to a list of elements. Subject to list fusion.
Return a list of this map's keys and elements. The order is not stable. Use toAscList for stable ordering.
O(n) Convert a vector to a list.
Convert a Bundle to a list
Convert a Bundle to a list
O(n) Convert a vector to a list.
O(n) Convert a vector to a list.
O(n) Convert a vector to a list.
O(n) Convert a vector to a list.
Return a list of this map's elements. The list is produced lazily. The order of its elements is unspecified.
Return a list of this set's elements. The list is produced lazily.
Convert the map to a list of key/value pairs. Subject to list fusion.
toList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
toList empty == []
Convert the set to a list of elements. Subject to list fusion.
Convert a pure Producer into a list