Skip to content

mate-academy/qa_unary-function-chainer

Repository files navigation

QA Unary function chainer (UA)

Write tests for a higher order function chainer for chaining together a list of unary functions. In other words, it should return a function that does a left fold on the given functions.

chainer([a,b,c,d])(input) === d(c(b(a(input))));

Example:

function f1(x) {return x * 2};
function f2(x) {return x + 2};
function f3(x) {return Math.pow(x, 2)};

chainer([f1, f2, f3])(0) === 4;

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •