aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gleam/float.gleam8
-rw-r--r--src/gleam/int.gleam8
-rw-r--r--test/gleam/float_test.gleam8
-rw-r--r--test/gleam/int_test.gleam8
4 files changed, 2 insertions, 30 deletions
diff --git a/src/gleam/float.gleam b/src/gleam/float.gleam
index c2a8705..e6133fa 100644
--- a/src/gleam/float.gleam
+++ b/src/gleam/float.gleam
@@ -498,13 +498,7 @@ pub fn multiply(a: Float, b: Float) -> Float {
///
/// > 3.0 |> subtract(2.0, _)
/// -1.0
-///
-/// > 3.0 |> subtract(subtrahend: 2.0)
-/// 1.0
-///
-/// > 3.0 |> subtract(minuend: 2.0)
-/// -1.0
/// ```
-pub fn subtract(minuend a: Float, subtrahend b: Float) -> Float {
+pub fn subtract(a: Float, b: Float) -> Float {
a -. b
}
diff --git a/src/gleam/int.gleam b/src/gleam/int.gleam
index 651257d..5760126 100644
--- a/src/gleam/int.gleam
+++ b/src/gleam/int.gleam
@@ -714,13 +714,7 @@ pub fn multiply(a: Int, b: Int) -> Int {
///
/// > 3 |> subtract(2, _)
/// -1
-///
-/// > 3 |> subtract(subtrahend: 2)
-/// 1
-///
-/// > 3 |> subtract(minuend: 2)
-/// -1
/// ```
-pub fn subtract(minuend a: Int, subtrahend b: Int) -> Int {
+pub fn subtract(a: Int, b: Int) -> Int {
a - b
}
diff --git a/test/gleam/float_test.gleam b/test/gleam/float_test.gleam
index 3379a47..44d9f52 100644
--- a/test/gleam/float_test.gleam
+++ b/test/gleam/float_test.gleam
@@ -420,12 +420,4 @@ pub fn subtract_test() {
3.0
|> float.subtract(2.0, _)
|> should.equal(-1.0)
-
- 3.0
- |> float.subtract(subtrahend: 2.0)
- |> should.equal(1.0)
-
- 3.0
- |> float.subtract(minuend: 2.0)
- |> should.equal(-1.0)
}
diff --git a/test/gleam/int_test.gleam b/test/gleam/int_test.gleam
index 29eb0fe..4768432 100644
--- a/test/gleam/int_test.gleam
+++ b/test/gleam/int_test.gleam
@@ -530,12 +530,4 @@ pub fn subtract_test() {
3
|> int.subtract(2, _)
|> should.equal(-1)
-
- 3
- |> int.subtract(subtrahend: 2)
- |> should.equal(1)
-
- 3
- |> int.subtract(minuend: 2)
- |> should.equal(-1)
}