Closed Ne4to777 closed 4 years ago
@Ne4to777, are you saying that x => x
cannot be a member of a -> f b
? What if we were to make the following substitutions?
-- replace ‘a’ with ‘Array Number’
Array Number -> f b
-- replace ‘f’ with ‘Array’
Array Number -> Array b
-- replace ‘b’ with ‘Number’
Array Number -> Array Number
You are right. Tanks.
No problem. :)
Even more common case when x => x
is valid is when you already have applicatives inside your traversable. In other words your a
happen to be f b
.
Definition: fantasy-land/traverse :: Applicative f, Traversable t => t a ~> (TypeRep f, a -> f b) -> f (t b) Rule: t(u['fantasy-land/traverse'](F, x => x)) is equivalent to u['fantasy-land/traverse'](G, t) for any t such that t(a)'fantasy-land/map' is equivalent to t(a'fantasy-land/map') (naturality) Issue: definition part (a -> f b) is not equal to rule part (x => x)