UNPKG
lean4-code-actions
Version:
latest (1.1.32)
1.1.32
Refactorings and snippets for Lean 4
lean4-code-actions
/
libs
/
utils
/
arithmetic
/
getShare.ts
4 lines
(2 loc)
•
236 B
text/typescript
View Raw
1
2
3
4
import
{
BasicArithmetic
}
from
'../arithmetic'
export
const
getShare = <N>
(
{ mul, div, fromNumber }: BasicArithmetic<N>
) =>
(
denominator: N = fromNumber(
100
)
) =>
(
numerator: N
) =>
(
value: N
) =>
div
(
mul
(value, numerator), denominator)