Using flatMap to chain conditional operations

Yeah so.

map as a concept is very general, it comes from category theory and all that.
What you see in Scala is a (simplified?) implementation of such concept.

So, given Scala is a mix between FP and OOP, the creators of the language decided to model that function as a method on some classes, like Either, Option, List, etc.

Actually, y definition is also a simplification, since map comes from Functors which I didn’t mentioned.

BTW, if you want to learn more about FP, you can check my comment here.

So TL;DR;
Yes is the same function, Either becomes the F[_].