This is how the code above is desuggered (I altered the length of both lists):
```
val as = List(1, 2)
val bs = List(3, 4, 5, 6)
as.flatMap(a => bs.map(b => a + b))
// result: List(4, 5, 6, 7, 5, 6, 7, 8)
```
Login to reply
Replies (1)
So in case the first list has two elements, two lists will be created and then flattened into one.