![](https://lemmy.world/pictrs/image/3b7f891e-dc87-4afd-ac89-3a8b7b847d1a.png)
![](https://programming.dev/pictrs/image/9fcac0c0-32b5-40c9-bb7c-53bc37d32884.png)
Wouldn’t this code fail in a case like this? Because you count different lines, not different characters in the lines, right? Or am I missing something? Thanks (Let’s ignore column symmetry for the sake of example).
##
..
..
..
(I think you will get answer 100, but the answer is 300)
But for sure after seeing this I have to learn Scala.
Oh, I see, I for some reason switched zip operation with “create pair/tuple” operation in my head. Thanks for clarification.