3 ms·
Anyone else try to do a lazy AND evaluation for chapter 12 and have it fail? I did fC(gC(function(){success,failure};),failure); but the desired answer checke
by shard 15y ago
Anyone else try to do a lazy AND evaluation for chapter 12 and have it fail? I did
fC(gC(function(){success,failure};),failure);
but the desired answer checked gC even if fC already failed..
- cjp 15y agoMy first attempt was about the same, until I realized I missed a requirement: > Your function bothC should call both fC and gC no matter what What happens in your code if fC fails?
- shard 15y agoAh good point, forgot about that requirement.
- altano 15y agoYou're passing in the return value of gC() as the first parameter to fC(). gC() doesn't return anything, let alone a function. Also, you're only passing in one parameter into gC(). I'm not sure that makes sense?