Consegui aqui:

const somar = (x, y) => {

  if (typeof y === "undefined") {
      return (y) => somar(x, y);
  }

  return x + y
}

let newSoma = somar(2)

console.log(newSoma(3))