Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
gkucmierzFailed Tests

Memoize

Functions
Control Flow
Basic Language Features
Fundamentals

Write Memoize function.

Memoize is function that take as argument function and return another function.

This returned function should call original function with the same arguments, but it should never call this function with exact the same arguments.

It should just return cahed result instead.

function memoize(func) {
  return (...args) => {
    // your function
  };
}