typocomath/src/generic/arithmetic.ts

8 lines
184 B
TypeScript
Raw Normal View History

2022-12-23 12:52:56 +00:00
import type { FnMultiply, FnSquare } from "../interfaces/arithmetic"
export const square =
<T>(dep: {
2022-12-23 12:52:56 +00:00
multiply: FnMultiply<T>
}): FnSquare<T> =>
(z) => dep.multiply(z, z)