/**
 * Creates a function that multiplies its input by `multiplicand`. Use it with
 * {@link pipe}, or as the callback of a function such as {@link map}.
 *
 * @param multiplicand - The number to multiply the input by.
 * @returns A function that maps a `number` to `value * multiplicand`.
 *
 * @example
 * import { pipe, map, multiply } from 'es-toolkit/fp';
 *
 * pipe(3, multiply(2)); // => 6
 * pipe([1, 2, 3], map(multiply(3))); // => [3, 6, 9]
 */
export function multiply(multiplicand: number): (value: number) => number {
  return function (value: number): number {
    return value * multiplicand;
  };
}
