lundi 4 septembre 2017

Testing Currying functions

Considering that I would like to test f1, f2, f3, and f4 separately, what would be the best way to decouple such a carrying-in function:

let test = function f1(a) {
    return function f2(b) {
      return function f3(c) {
        return function f4(d) {
          // ...
        }
     }
  }
}

Aucun commentaire:

Enregistrer un commentaire