djbpitt / scala-graphing-sandbox

2 stars 0 forks source link

Nested maps? #5

Closed djbpitt closed 1 year ago

djbpitt commented 1 year ago

Can we make seq.map(_.map(???)) easier to read by using for comprehensions, flatmap(), or other alternatives?

rhdekker commented 1 year ago

Code is remarked at the moment. In theory this should be done using a flatmap on the outer sequence. It might however require that the inner and outer collections are of the same type.