typocomath/src/generic/arithmetic.ts

8 lines
184 B
TypeScript

import type { FnMultiply, FnSquare } from "../interfaces/arithmetic"
export const square =
<T>(dep: {
multiply: FnMultiply<T>
}): FnSquare<T> =>
(z) => dep.multiply(z, z)