Skip to content

Commit

Permalink
Complete Homework SunJieMing#4. Still need to finish extra credit
Browse files Browse the repository at this point in the history
  • Loading branch information
StevieIsmagic committed Jul 10, 2017
1 parent e8fbe87 commit d9681c3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions exercises.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,10 @@ function cacheFunction(cb) {
//use closure to create a cache for the cb function
//the function that you return should accept a
//single argument and invoke cb with that argument
return function(arg){
cb(arg);
}

//when the function you return is invoked with
//an argument it should save that argument and its result
var save = callBack
if

//when the function you return is called again
//with an argument that it has seen before it should not call cb
//but should instead directly returned the previous result
Expand Down

0 comments on commit d9681c3

Please sign in to comment.