Why does the code of line
generateScripts pb = (greet <$>) <$> (maybeName <$> pb
have an extra functor after greet? Based on my understanding, I know that the LHS function will be used on the RHS but since there is an extra functor, I don't understand how it works.
maybeName :: (String, String) -> Maybe String
maybeName p = if length (snd p) == 10 then Just (fst p) else Nothing
generateScripts :: [(String, String)] -> [Maybe String]
generateScripts pb = (greet <$>) <$> (maybeName <$> pb)
where greet = ("Hello "++)
phonebook = [ ("Bob", "0178866524"), ("Fred", "01624556442"), ("Alice", "0188998533") ]
GHCi> phonebook = [ ("Bob", "0178866524"), ("Fred", "01624556442"), ("Alice", "0188998533") ]
GHCi> generateScripts phonebook
[Just "Hello Bob",Nothing,Just "Hello Alice"]