03.08.2016Â­08.06.2016 . I wish to thank to all the colleagues of Psychology & Sociology Department, University of Bucharest for the generous help in presenting part of material. Â . .Q: Any proper ToM 2.0 implementation? in my project I need to parse and execute polynomials, as well as integers, but I don’t know any ToM implementation that can do this well. The UGen only multiplies like an I/O engine, any combination of terms returns an UGen. Even if you wanna try an implemented it, with little probability it will work with mine. Is there any better implementation that can do this? A: I wrote one for my own stuff. It’s pretty simple, and you’re free to use it as you see fit. The ToM API was created with a broader scope in mind, but I like your way better. It really only works with integers. I also use it to process quadratic equations (y^2 + 6y + 4 = 0) from strings, which is a pain. Anyway, the API is on github here. I’m hoping to post code examples soon, but it’s still going to be a while. Q: Arrow function does not work as expected with promises I have a simple arrow function that sums up a given product of quantity and price. This is how I defined this function: const sum = quantity => price => quantity * price; However, my expect statement gives me a 400 error that 400 is a number. expect(sum(12, 12)).to.equal(144); How would you define this function? Thanks A: As @mplungjan says, you need to use string concatenation to create the promise, and pass callbacks to promise.then: const sum = (quantity, price) => quantity * price; const wait = 1000; const promise = new Promise((resolve, reject) => { setTimeout(resolve, wait); }); promise.then(res => { console.log(res); // => “Promise
https://ello.co/0inguizlupi/post/qrxusrkjwtpb0k5toa-ycw