code: function remapActions(actions) {
      return Object.keys(actions)
          .map(name => {
              let action = (val) => {
                  actions[name].next(val);
                  return action;
              };
  
              action.hook = (id) =>  actions[name].hook.filter(([idB, _]) => idB === id);
              action.error = (err) => {
                  actions[name].error(err);
                  return actions[name];
              };
  
              return [name, action]
          })
          .reduce((acc, [name, action]) => ({ ...acc, [name]: action  }), {});
  }
docs: /*
  Remaps the subject methods `next` and `error` to the "root function" and
  error prop respectively.