If you understand map applied to list, you are well on your way. A functor is just the map concept made more abstract (general).
If you have studied any kind of higher mathematics, you will have learned to start fresh when encountering familiar names. In algebra we have groups, rings, and fields and it is entirely misleading to try to relate the mathematical concepts to our ideas about rings (for example) in the everyday world. This is true in Haskell when we encounter unfamiliar words like functor or monad. Don't let the word intimidate you. Find out what the concept is and remain calm.
Functor is a typeclass not a type. A typeclass indicates some sort of behavior and can apply to many types. A list is a functor (and many other things) because it can act like a functor. Functor behavior simply means that the thing can be mapped over. So we already can understand how list is a functor given the existence of map.
For some type to be a functor, there must be an implementation of the "fmap" function for that type. In the case of a list, the implementation is good old "map". For the Maybe type, map is implemented as follows:
instance Functor Maybe where fmap f (Just x) = Just (f x) fmap f Nothing = NothingThe basic idea with functor is that we have some kind of "container". We want to operate on what is inside the container. We have a function that accepts the type of whatever is in the container and returns some new type that gets put in the container replacing whatever was there previously.
newlist = fmap func list newlist = func <$> list
Tom's software pages / tom@mmto.org