3 ms·
I'm not convinced. I'm not familiar with the last approach but it seems to me that with a couple of higher-order functions in JavaScript, the code will quickly
by zimbatm 14y ago
I'm not convinced.
I'm not familiar with the last approach but it seems to me that with a couple of higher-order functions in JavaScript, the code will quickly become more manageable.
function getPhoto(tag, handlerCallback) {
asyncChain(requestTag, requestOneFrom)(tag, function(photoSizes) {
handlerCallback(sizesToPhoto(photoSizes));
});
}
getPhoto('tokyo', drawOnScreen);