I wonder how heterogeneous lists/grids will be han...
# compose
l
I wonder how heterogeneous lists/grids will be handled though.
l
lots of ways to skin this cat, but for some inspiration, consider:
Copy code
HeterogeneousList(data)  { item -> when(item.type) { ... } }
and for grid, something like
Copy code
Grid(rows, columns) { row, column -> ... }
Of course something truly general will probably have a lot of configurable options, but it’s really easy to create some of these simpler overloads if it fits your use case, cleaning up code significantly.
👍 2