aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2020-03-29 14:54:06 +0100
committerLouis Pilfold <louis@lpil.uk>2020-03-29 14:54:22 +0100
commit7de6de494af9e85351d416a20bab5cd82749f935 (patch)
tree678cb18027551ea5474c2a0aa8c7a6857e2970bd
parent58c57cd4102a1748f5f40fa7dbb0e5dc2498d39f (diff)
downloadgleam_stdlib-7de6de494af9e85351d416a20bab5cd82749f935.tar.gz
gleam_stdlib-7de6de494af9e85351d416a20bab5cd82749f935.zip
Correct invalid examples
-rw-r--r--src/gleam/float.gleam2
-rw-r--r--src/gleam/pair.gleam10
-rw-r--r--test/gleam/int_test.gleam2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/gleam/float.gleam b/src/gleam/float.gleam
index 4ee941d..6d6ab49 100644
--- a/src/gleam/float.gleam
+++ b/src/gleam/float.gleam
@@ -108,7 +108,7 @@ pub external fn round(Float) -> Int = "erlang" "round";
///
/// ## Examples
/// ```gleam
-/// truncate(2.4343434847383438) = 2
+/// truncate(2.4343434847383438) == 2
/// ```
///
pub external fn truncate(Float) -> Int = "erlang" "trunc";
diff --git a/src/gleam/pair.gleam b/src/gleam/pair.gleam
index 64b4212..5883328 100644
--- a/src/gleam/pair.gleam
+++ b/src/gleam/pair.gleam
@@ -4,7 +4,7 @@
///
/// ## Examples
/// ```gleam
-/// first(tuple(1, 2)) = 1
+/// first(tuple(1, 2)) == 1
/// ```
///
pub fn first(pair: tuple(a, b)) -> a {
@@ -16,7 +16,7 @@ pub fn first(pair: tuple(a, b)) -> a {
///
/// ## Examples
/// ```gleam
-/// second(tuple(1, 2)) = 2
+/// second(tuple(1, 2)) == 2
/// ```
///
pub fn second(pair: tuple(a, b)) -> b {
@@ -28,7 +28,7 @@ pub fn second(pair: tuple(a, b)) -> b {
///
/// ## Examples
/// ```gleam
-/// swap(tuple(1, 2)) = tuple(2, 1)
+/// swap(tuple(1, 2)) == tuple(2, 1)
/// ```
///
pub fn swap(pair: tuple(a, b)) -> tuple(b, a) {
@@ -41,7 +41,7 @@ pub fn swap(pair: tuple(a, b)) -> tuple(b, a) {
///
/// ## Examples
/// ```gleam
-/// map_first(tuple(1, 2), fn(n) { n * 2 }) = 2
+/// tuple(1, 2) |> map_first(fn(n) { n * 2 }) == 2
/// ```
///
pub fn map_first(of pair: tuple(a, b), with fun: fn(a) -> c) -> tuple(c, b) {
@@ -54,7 +54,7 @@ pub fn map_first(of pair: tuple(a, b), with fun: fn(a) -> c) -> tuple(c, b) {
///
/// ## Examples
/// ```gleam
-/// map_second(tuple(1, 2), fn(n) { n * 2 }) = 4
+/// tuple(1, 2) |> map_second(fn(n) { n * 2 }) == 4
/// ```
///
pub fn map_second(of pair: tuple(a, b), with fun: fn(b) -> c) -> tuple(a, c) {
diff --git a/test/gleam/int_test.gleam b/test/gleam/int_test.gleam
index 267645b..27335d5 100644
--- a/test/gleam/int_test.gleam
+++ b/test/gleam/int_test.gleam
@@ -11,7 +11,7 @@ pub fn to_string() {
|> int.to_string
|> should.equal(_, "-123")
- 0123
+ 123
|> int.to_string
|> should.equal(_, "123")
}