Comments (6)
I think you might be reading an outdated version of the Fantasy Land spec. Since version 1.0, Fantasy Land has required compliant methods to be prefixed:
v['fantasy-land/ap'](u['fantasy-land/ap'](a['fantasy-land/map'](f => g => x => f(g(x)))))
is equivalent tov['fantasy-land/ap'](u)['fantasy-land/ap'](a)
-- https://github.com/fantasyland/fantasy-land#apply
You'll find that v['fantasy-land/ap']
will behave as expected.
from fluture.
Does the ap method not meet the requirements of fantasy-land? If so what specification is it using?
from fluture.
The fantasy-land/ap
method follows the specification. The ap
function is a polymorphic dispatcher which dispatches to fantasy-land/ap
. There is no specification for dispatchers. Library authors are free to implement them as they see fit.
from fluture.
As I understand ap fallbacks to fantasy-land/ap only if context is not Future, right?
from fluture.
That's an optimization for performance and debugging reasons made within the Fluture code. It does not alter the behaviour of ap
compared to what it would be as a plain dispatcher to m['fantasy-land/ap']
.
from fluture.
In other words, the following code can be removed:
Lines 9 to 15 in 9e8084e
...And all unit tests except the ones related to error messages and debugging will still pass.
from fluture.
Related Issues (20)
- Error in readme HOT 4
- Is it proven that Fluture Future is lawful? HOT 4
- Access computation value as return value HOT 3
- Why does encaseP / attemptP accepts only one parameter? HOT 4
- Event Streams handling HOT 5
- Any future for Fluture on React Native? HOT 4
- chainRej example doesn't include all code needed to replicate
- Consider preserving the specific Error sub-type when converting to Promise HOT 5
- Why not thenables? HOT 3
- Example Sanctuary integration code throws an error
- Unable to infer types in function passed to `map` HOT 13
- Investigate option for alternative debug api
- Make typings for algebras more strict
- It seams like `Hook (Future e a) b` is equivalent to `ContT a (Future e) b` HOT 1
- Add Future.assume?
- Async Iterators HOT 4
- Using Fluture with Jest HOT 1
- TypeScript error using map HOT 4
- Use result of Future
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluture.