Skip to content

Commit 1cf287d

Browse files
imacgsharkdp
authored andcommitted
Remove unnessesary utility function
1 parent 608d247 commit 1cf287d

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/Data/Quantity/Math.purs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ lift ∷ (Decimal → Decimal) → Quantity → Result
5050
lift fn q = (scalar' <<< fn) <$> toScalar' q
5151

5252
lift2 (Decimal Decimal Decimal) Quantity Quantity Result
53-
lift2 fn q1 q2 = scalar' <$> (fn <$> toScalar' q1 <*> toScalar' q2)
54-
55-
lift2' (Decimal Decimal Decimal) Quantity Quantity Result
56-
lift2' f q1 q2 = do
53+
lift2 f q1 q2 = do
5754
let u = derivedUnit q1
5855
v1 ← q1 `asValueIn'` u
5956
v2 ← q2 `asValueIn'` u
@@ -69,7 +66,7 @@ atan ∷ Quantity → Result
6966
atan = lift Decimal.atan
7067

7168
atan2 Quantity Quantity Result
72-
atan2 = lift2' Decimal.atan2
69+
atan2 = lift2 Decimal.atan2
7370

7471
cos Quantity Result
7572
cos = lift Decimal.cos
@@ -114,13 +111,13 @@ log10 ∷ Quantity → Result
114111
log10 = lift Decimal.log10
115112

116113
max2 Quantity Quantity Result
117-
max2 = lift2' Decimal.max
114+
max2 = lift2 Decimal.max
118115

119116
max NonEmptyList Quantity Result
120117
max xs = foldM max2 (head xs) (tail xs)
121118

122119
min2 Quantity Quantity Result
123-
min2 = lift2' Decimal.min
120+
min2 = lift2 Decimal.min
124121

125122
min NonEmptyList Quantity Result
126123
min xs = foldM min2 (head xs) (tail xs)
@@ -131,7 +128,7 @@ mean xs = (_ ⊘ n) <$> foldM (⊕) (head xs) (tail xs)
131128
n = scalar' (Decimal.fromInt (length xs))
132129

133130
modulo Quantity Quantity Result
134-
modulo = lift2' Decimal.modulo
131+
modulo = lift2 Decimal.modulo
135132

136133
round Quantity Result
137134
round = lift Decimal.round

0 commit comments

Comments
 (0)