Comments (7)
Thank you @axefrog I will look into this ASAP
from proxy.
@axefrog Also as a fun fact you can use fulfill
inside of .thru()
It simply returns the stream passed to it
function proxy(initial) {
const {attach, stream} = makeProxy();
return [stream.startWith(initial), attach];
}
export default function flatScan(f, initial) {
return stream => {
const [proxyState$, fulfill] = proxy(initial);
const state$ = most.just(proxyState$).join(); // prevent proxy disposal bug
const initialize = (x, state) => f(state, x, state$);
const nextState$ = sample(initialize, stream, state$)
.join()
.thru(fn$ => sample((fn, state) => fn(state), fn$, state$))
.startWith(initial)
.multicast()
.thru(fulfill);
return state$;
};
}
from proxy.
Ah, very concise, thanks for the tip!
from proxy.
@axefrog If you could provide me with a minimal test case, that wouhld be very helpful. I've not been able to come up with one on my own.
from proxy.
Here's an example from @whitecolor http://www.webpackbin.com/Vyg5aOS4-
from proxy.
@axefrog you may try also https://github.com/whitecolor/cycle-proxy it is a like, but more general solution implemented using cycle adapters.
from proxy.
This should be fixed with version 3.2.0.
I have a test for this now, modified from the webpackbin @whitecolor made, thanks for that again @whitecolor. That test is here
from proxy.
Related Issues (3)
- npm install fails on typescript error HOT 1
- Stack overflow? HOT 2
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 proxy.