derivable methods are contradictory
See original GitHub issueA value that implements the Applicative specification must also implement the Apply specification.
A value that implements the Apply specification must also implement the Functor specification.
A value which has a Functor must provide a
map
method.
So a value that implements the Applicative specification must provide a map
method.
Here is the contradiction:
A value which satisfies the specification of an Applicative does not need to implement:
- Functor’s
map
; derivable asfunction(f) { return this.of(f).ap(this); }
Is there a semantic difference between “implements the Applicative specification” and “satisfies the specification of an Applicative”?
I’m wondering whether Ramda’s map
function should operate on a value which provides of
and ap
but not map
. The fact that derivations are mentioned in the spec suggests they are desirable, but as written it doesn’t seem correct to derive implementations.
Issue Analytics
- State:
- Created 7 years ago
- Comments:30 (21 by maintainers)
Top GitHub Comments
@puffnfresh, could you state definitively how to resolve the contradiction? The rest of us are guessing.
👍