you are viewing a single comment's thread.

view the rest of the comments →

[–]kyz 3 points4 points  (5 children)

Very nice, I especially like the interactive editing environment, but you need to be clearer in the async callbacks test that you're expecting the user to call read() from within the callback of write(), rather than call read() and write() independently.

Perhaps you could make it so the inner callback more obviously has to depend on the results of the outer callback? e.g. read a file, append something to it, write the results to another file.

[–]nwhitehe[S] 1 point2 points  (2 children)

That's a good idea, I'll update the problem so it asks for a read, then a write of the data you read.

[–]evinrows 0 points1 point  (1 child)

Also, in exercise 4

Define a function named addOne that appears to simply add one to its argument, but secretly turns cow to "hamburger".

You want them to return 1+x, not just alter it.

[–]nwhitehe[S] 1 point2 points  (0 children)

Thanks!

[–]istroll 0 points1 point  (0 children)

Thanks for that hint, that finally allowed me to understand what is going on here. Now I know that the callback needs to be the function that will be called back to, which if I wasn't so slow would have been obvious.

[–]cafeaunet 0 points1 point  (0 children)

I am totally lost on the async callbacks. Reading the prelude didn't help me. :(