Factory Functions & Singleton Pattern

What pattern does this approach demonstrate?
function createShape(type) {
  if (type === 'circle') {
    return function(radius) {
      return {
        type: 'circle',
        radius,
        area: () => Math.PI * radius * radius
      };
    };
  } else if (type === 'rectangle') {
    return function(width, height) {
      return {
        type: 'rectangle',
        width,
        height,
        area: () => width * height
      };
    };
  }
}
Next Question (7/32)