3 ms·
> is the natural transformation from identity functor Sorry I confused you here. I meant, if you had a function of that type (a -> f a), you would want a natu
by kmill 7y ago
> is the natural transformation from identity functor
Sorry I confused you here. I meant, if you had a function of that type (a -> f a), you would want a naturality relation to hold for it, like how 'return' for monads is meant to relate to fmap.
As it is, just having a map "a -> f a" is not a natural transformation.
(I think you might be confusing objects of Hask with the category Hask itself. Remember that "a -> f a" means "for each object 'a' of Hask, a function that takes an element of 'a' to an element of 'f a'. The functor is f : Hask -> Hask, an endofunctor. (In haskell, Hask is replaced by stars.) "f a" is the object of Hask that F sends "a" to.)