Functors and functions both called `f` can be confusing
See original GitHub issueIn https://github.com/fantasyland/fantasy-land#map-method
the letter f
denotes a functor:
map :: Functor f => f a ~> (a -> b) -> f b
But in the next line the same f
is a function:
u.map(x => f(g(x)))
Would it be less confusing to use different letters perhaps?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:14 (6 by maintainers)
Top Results From Across the Web
The name "Functor" can be confusing; it's a thing you apply a ...
The name "Functor" can be confusing; it's a thing you apply a function to, not a function itself. A Functor is a type...
Read more >category theory - The definition of functor. Is a functor a function?
So, you can think about a functor as a "function"(which indeed is not) between both objects and morphisms. For your another confusion, ...
Read more >confused about function as instance of Functor in haskell
The fmap instance for (->) r (i.e. functions) is literally just composition. From the source itself: instance Functor ((->) r) where fmap ...
Read more >Functors - Bartosz Milewski's Programming Cafe
Just like functions, functors may do both collapsing and embedding. The embedding aspect is more prominent when the source category is much ...
Read more >Functors, Applicative Functors and Monoids
Calling fmap on a functor should just map a function over the functor, nothing more. This behavior is described in the functor laws....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This looks like a duplicate of #217 to me.
It bears repeating that these identifiers don’t have to be single letters; would it be easier if the definition were simply
map :: Functor flType => flType a -> (a -> b) -> flType b
?