explanation of es 6 code

Viewed 71

Can anyone explain what the code is doing here

return () => next => action => {
  const callAPI = action[CALL_API];

  if (typeof callAPI === 'undefined') {
    return next(action);
  }

  let { endpoint } = callAPI;
  const { types, bailout } = callAPI;

It is initially returning a function but I don't get why there are two further fat arrows after the first.

2 Answers
Related