aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Rothuis <alex.rothuis@gmail.com>2022-11-02 18:09:22 +0100
committerLouis Pilfold <louis@lpil.uk>2022-11-06 16:45:54 +0000
commit0e14d0439bbd798656c9f161ce0fcd49b5bc12d3 (patch)
treef5e4f4b0ec4dc7ade5abdd6182018bedb19c2ddd /src
parente898021299a47ede3332900bffaef8a72ff0d661 (diff)
downloadgleam_stdlib-0e14d0439bbd798656c9f161ce0fcd49b5bc12d3.tar.gz
gleam_stdlib-0e14d0439bbd798656c9f161ce0fcd49b5bc12d3.zip
Remove labels from subtract operator functions
Diffstat (limited to 'src')
-rw-r--r--src/gleam/float.gleam8
-rw-r--r--src/gleam/int.gleam8
2 files changed, 2 insertions, 14 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
}