Comments (3)
Overloading an api with alternative syntax for the same things should generally be avoided unless there's a real benefit to it. In this case, I'm doubtful that adding built-in pipe-like behavior to flatMap
(or any other operator) would be beneficial. In my opinion, this'd negatively impact readability and composability.
Effect.flatMap( // Effect<..., C>
Effect<..., A>
(a: A) => Effect<..., B>,
(a: B) => Effect<..., C>,
// etc...
)
vs.
pipe(
// ...
Effect.flatMap(...),
Effect.flatMap(...),
Effect.flatMap(...),
// etc...
)
I personally prefer the latter.
from io.
I feel like adding this only to flatMap would be awkward and adding it everywhere counter-productive, it is also a good use case for generators so the motivation isn't too strong for it to be included in the library
from io.
Makes sense. Ok. I'll close this for now.
from io.
Related Issues (20)
- Configurable path delimiter in ConfigError HOT 1
- Feature Request - Add Pretty Print for `Exit` Data Type
- Feature request: tapErrorTag
- Feature request: throwTag, throwTagWith
- Feature request: Support using multiple Caches HOT 1
- Feature request: setConfigProviderEffect HOT 1
- Bug: Functions that work with tagged error fail at type level when non-tagged error present HOT 1
- From Discord: Missing Context Derivation in `effect-ts`: Renamed or No Longer Available? HOT 2
- Feature request: printing metrics
- Cache / Request Cache should allow specifying a weight function and a maximum weight
- Tiered caches
- Persisted caches
- From Discord: Difference in callback parameters for `filterOrFail` and `filterOrDie`
- From Discord: Proposing a `Effect.flatMapError` Function HOT 1
- From Discord: Missing Stack Trace in EffectA
- `Effect.serviceMembers` (and variants) do not recognize `Stream` returning members HOT 6
- From Discord: Converting Either to Effect in ZIO: ZIO.fromEither
- [Bug] Cause.reduceWithContext HOT 2
- From Discord: Lack of Concurrency/Batching Option for Effect.replicteEffect
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 io.