I don't really know Java, but .flatMap(...) seems to be equivalent to C# .SelectMany(...) which famously can be interpreted as a monadic bind operator.
The C# query syntax
from x in xs
from y in GetYs(x)
from z in GetZs(y) ...
which is similar to monadic do-notation in Haskell.
So since there is monadic Scala code elsewhere in the project, I wonder if this is a result of someone thinking in Scala and translating it into Java in their head.
The C# query syntax
is equivalent to which is similar to monadic do-notation in Haskell.So since there is monadic Scala code elsewhere in the project, I wonder if this is a result of someone thinking in Scala and translating it into Java in their head.