-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
32 answer had opened 33 task while I had wrongly implemented code #142
Comments
Now I am not sure if I would have done the excersize myself, but I tried to analise and understand the answer. Hard part is to solve the task comparing to arrays because we cannot log sequence to the console like array. Maybe we can do that by forearhing or subscribing to the observable. But first time doing that task its not obvious. So I had a question - why concatMap instead of map. Besides that with videos there was example of using concatMap. And I thinked and came to this: Why concatMap instead of map?
So we call concatALl and get array looking like
The drag is single sequence even if we had many mouse down and mouse up events.
So I guess before 32 excersize you could make some bit easier excersizes still so the user could learn to imagine the sequence as an array, how to print it for debugging. Also for me it helped looking at concatAll documentation: And btw I hade MD code highlightint not working >:( of course its not your fault but github fault. Even stak overflow works better. Or MD fault that its not so user friendly and I need to dig at documentation how to damn syntax highlight. >:( But thanks for good tutorial, so far its best of what I have found, tried. At first I did not try it, but tried another because it looked too simple like using map - wtf, its not hard and I learn nothing i thought. But then came back to this, because others were to hard to understand of not enough examplination. |
Please use triple back ticks to format your code snippets |
Today no matter what you've written, next exercise will be unlocked as soon as you reload the page. This is indeed needed because almost each of the tasks doesn't work :( |
So as title says - I did it wrong, but - the drag was not working, but I saw 33 had openened like I had done right.
My drag was implemented like this:
`
function(sprite, spriteContainer) {
// imagine mouse downs is array
var spriteMouseDowns = Observable.fromEvent(sprite, "mousedown"),
spriteContainerMouseUps.forEach(function(event) {
console.log('up', event);
})
spriteContainerMouseMoves.forEach(function(event) {
console.log('move', event);
})
}
`
The text was updated successfully, but these errors were encountered: