Monad can pass Just [1,2], which is a different type from what the original length function takes, to >>= return . length.
Just [1,2] >>= return . length
Can I say that Monad makes it possible to see Maybe [a] as isomorphic with [a] on length using (>>=, return)? (Of course they are not really isomorphic.)
Can I choose the term "isomorphic" this situation?
 
                        
What your example ultimately illustrates is that
Maybeis a functor: if you have somef :: a -> b, you can usefmapto turn it intofmap f :: Maybe a -> Maybe bin a way that preserves identities and composition. Monads are functors, with\f m -> m >>= return . fbeing the same asfmap f m. In your case, we have thelengthfunction being transformed by theMaybefunctor.Not really.
fmapforMaybeis not an isomorphism. An isomorphism requires there being a two-sided inverse that undoes it, which in this case would be something like:However, there are no
(Maybe a -> Maybe b) -> (a -> b)functions, as there is no way to obtain abresult if the inputMaybe a -> Maybe bfunction gives out aNothing. While there are specific functors whosefmapis an isomorphism (Identityis one example), that is not the case in general.