If the examples are in Haskell, it should definitely use the Haskell term, so that people can then run the code.
An alternate might be to have examples in multiple languages, colour-coded.
I think they should use map in the text and fmap in the Haskell examples, while explaining quickly why Haskell uses fmap. You can translate an example with map in Python, JS, Java, etc. fmap is Haskell-specific. I also think we shouldn't tie "functional design patterns" to Haskell so much, but that's a bigger issue.
Seems like this would be a bit confusing though? `fmap` (flatMap) corresponds to `bind` or `chain` (Monad) rather than `map` (Functor) right?
Nope, `fmap` is indeed short for functor map. It's a historical accident in Haskell as `map` was specialised for lists (ie. `[]`) from the start and later, when mapping would be generalised to all things Functorial, it needed a new name so as to not break everything, hence `fmap`.
Awesome thank you for the clarification. I extra agree with the confusion then since `fmap` sounded exactly like `flatMap` to me!
No, "fmap" is actually the name in Haskell given to the function defined by the Functor typeclass. It was named "fmap" ("f"unctor map) because "map" was already taken by the map specialized to lists.
`flatMap` is actually called `concatMap` in Haskell, or more generically the monadic bind operator `>>=`.