aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcin Puc <marcin.e.puc@gmail.com>2021-05-07 00:15:52 +0200
committerLouis Pilfold <louis@lpil.uk>2021-05-07 11:17:45 +0100
commitb506e702609882163c16d365150e408b9844c457 (patch)
tree011cc171e8dd363c3779bfe9f3ea2a7a39475a98 /src
parent0cbad902a31a6c73ff5a93d5fec4380f7e5f77aa (diff)
downloadgleam_stdlib-b506e702609882163c16d365150e408b9844c457.tar.gz
gleam_stdlib-b506e702609882163c16d365150e408b9844c457.zip
Reformat tuples in doc comments
Diffstat (limited to 'src')
-rw-r--r--src/gleam/dynamic.gleam84
-rw-r--r--src/gleam/iterator.gleam6
-rw-r--r--src/gleam/list.gleam64
-rw-r--r--src/gleam/map.gleam66
-rw-r--r--src/gleam/option.gleam4
-rw-r--r--src/gleam/pair.gleam12
-rw-r--r--src/gleam/queue.gleam8
-rw-r--r--src/gleam/result.gleam4
-rw-r--r--src/gleam/string.gleam4
-rw-r--r--src/gleam/uri.gleam4
10 files changed, 128 insertions, 128 deletions
diff --git a/src/gleam/dynamic.gleam b/src/gleam/dynamic.gleam
index 15fcaef..162045f 100644
--- a/src/gleam/dynamic.gleam
+++ b/src/gleam/dynamic.gleam
@@ -305,10 +305,10 @@ pub external fn field(from: Dynamic, named: a) -> Result(Dynamic, String) =
///
/// ## Examples
///
-/// > element(from(tuple(1, 2)), 0)
+/// > element(from(#(1, 2)), 0)
/// Ok(from(1))
///
-/// > element(from(tuple(1, 2)), 2)
+/// > element(from(#(1, 2)), 2)
/// Error("Expected a tuple of at least 3 size, got a tuple of 2 size")
///
/// > element(from(""), 2)
@@ -324,10 +324,10 @@ pub external fn element(from: Dynamic, position: Int) -> Result(Dynamic, String)
///
/// ## Examples
///
-/// > tuple2(from(tuple(1, 2)))
-/// Ok(tuple(from(1), from(2)))
+/// > tuple2(from(#(1, 2)))
+/// Ok(#(from(1), from(2)))
///
-/// > tuple2(from(tuple(1, 2, 3)))
+/// > tuple2(from(#(1, 2, 3)))
/// Error("Expected a 2 element tuple")
///
/// > tuple2(from(""))
@@ -344,13 +344,13 @@ pub external fn tuple2(from: Dynamic) -> Result(#(Dynamic, Dynamic), String) =
///
/// ## Examples
///
-/// > typed_tuple2(from(tuple(1, 2)), int, int)
-/// Ok(tuple(1, 2))
+/// > typed_tuple2(from(#(1, 2)), int, int)
+/// Ok(#(1, 2))
///
-/// > typed_tuple2(from(tuple(1, 2.0)), int, float)
-/// Ok(tuple(1, 2.0))
+/// > typed_tuple2(from(#(1, 2.0)), int, float)
+/// Ok(#(1, 2.0))
///
-/// > typed_tuple2(from(tuple(1, 2, 3)), int, float)
+/// > typed_tuple2(from(#(1, 2, 3)), int, float)
/// Error("Expected a 2 element tuple, got a 3 element tuple")
///
/// > typed_tuple2(from(""), int, float)
@@ -374,10 +374,10 @@ pub fn typed_tuple2(
///
/// ## Examples
///
-/// > tuple3(from(tuple(1, 2, 3)))
-/// Ok(tuple(from(1), from(2), from(3)))
+/// > tuple3(from(#(1, 2, 3)))
+/// Ok(#(from(1), from(2), from(3)))
///
-/// > tuple3(from(tuple(1, 2)))
+/// > tuple3(from(#(1, 2)))
/// Error("Expected a 3 element tuple")
///
/// > tuple3(from(""))
@@ -396,13 +396,13 @@ pub external fn tuple3(
///
/// ## Examples
///
-/// > typed_tuple3(from(tuple(1, 2, 3)), int, int, int)
-/// Ok(tuple(1, 2, 3))
+/// > typed_tuple3(from(#(1, 2, 3)), int, int, int)
+/// Ok(#(1, 2, 3))
///
-/// > typed_tuple3(from(tuple(1, 2.0, "3")), int, float, string)
-/// Ok(tuple(1, 2.0, "3"))
+/// > typed_tuple3(from(#(1, 2.0, "3")), int, float, string)
+/// Ok(#(1, 2.0, "3"))
///
-/// > typed_tuple3(from(tuple(1, 2)), int, float, string)
+/// > typed_tuple3(from(#(1, 2)), int, float, string)
/// Error("Expected a 3 element tuple, got a 2 element tuple")
///
/// > typed_tuple3(from(""), int, float, string)
@@ -428,10 +428,10 @@ pub fn typed_tuple3(
///
/// ## Examples
///
-/// > tuple4(from(tuple(1, 2, 3, 4)))
-/// Ok(tuple(from(1), from(2), from(3), from(4)))
+/// > tuple4(from(#(1, 2, 3, 4)))
+/// Ok(#(from(1), from(2), from(3), from(4)))
///
-/// > tuple4(from(tuple(1, 2)))
+/// > tuple4(from(#(1, 2)))
/// Error("Expected a 4 element tuple")
///
/// > tuple4(from(""))
@@ -450,13 +450,13 @@ pub external fn tuple4(
///
/// ## Examples
///
-/// > typed_tuple4(from(tuple(1, 2, 3, 4)), int, int, int, int)
-/// Ok(tuple(1, 2, 3, 4))
+/// > typed_tuple4(from(#(1, 2, 3, 4)), int, int, int, int)
+/// Ok(#(1, 2, 3, 4))
///
-/// > typed_tuple4(from(tuple(1, 2.0, "3", 4)), int, float, string, int)
-/// Ok(tuple(1, 2.0, "3", 4))
+/// > typed_tuple4(from(#(1, 2.0, "3", 4)), int, float, string, int)
+/// Ok(#(1, 2.0, "3", 4))
///
-/// > typed_tuple4(from(tuple(1, 2)), int, float, string, int)
+/// > typed_tuple4(from(#(1, 2)), int, float, string, int)
/// Error("Expected a 4 element tuple, got a 2 element tuple")
///
/// > typed_tuple4(from(""), int, float, string, int)
@@ -484,10 +484,10 @@ pub fn typed_tuple4(
///
/// ## Examples
///
-/// > tuple5(from(tuple(1, 2, 3, 4, 5)))
-/// Ok(tuple(from(1), from(2), from(3), from(4), from(5)))
+/// > tuple5(from(#(1, 2, 3, 4, 5)))
+/// Ok(#(from(1), from(2), from(3), from(4), from(5)))
///
-/// > tuple5(from(tuple(1, 2)))
+/// > tuple5(from(#(1, 2)))
/// Error("Expected a 5 element tuple")
///
/// > tuple5(from(""))
@@ -506,13 +506,13 @@ pub external fn tuple5(
///
/// ## Examples
///
-/// > typed_tuple5(from(tuple(1, 2, 3, 4, 5)), int, int, int, int, int)
-/// Ok(tuple(1, 2, 3, 4, 5))
+/// > typed_tuple5(from(#(1, 2, 3, 4, 5)), int, int, int, int, int)
+/// Ok(#(1, 2, 3, 4, 5))
///
-/// > typed_tuple5(from(tuple(1, 2.0, "3", 4, 5)), int, float, string, int, int)
-/// Ok(tuple(1, 2.0, "3", 4, 5))
+/// > typed_tuple5(from(#(1, 2.0, "3", 4, 5)), int, float, string, int, int)
+/// Ok(#(1, 2.0, "3", 4, 5))
///
-/// > typed_tuple5(from(tuple(1, 2)), int, float, string, int, int)
+/// > typed_tuple5(from(#(1, 2)), int, float, string, int, int)
/// Error("Expected a 5 element tuple, got a 2 element tuple")
///
/// > typed_tuple5(from(""), int, float, string, int, int)
@@ -542,10 +542,10 @@ pub fn typed_tuple5(
///
/// ## Examples
///
-/// > tuple6(from(tuple(1, 2, 3, 4, 5, 6)))
-/// Ok(tuple(from(1), from(2), from(3), from(4), from(5), from(6)))
+/// > tuple6(from(#(1, 2, 3, 4, 5, 6)))
+/// Ok(#(from(1), from(2), from(3), from(4), from(5), from(6)))
///
-/// > tuple6(from(tuple(1, 2)))
+/// > tuple6(from(#(1, 2)))
/// Error("Expected a 6 element tuple")
///
/// > tuple6(from(""))
@@ -564,13 +564,13 @@ pub external fn tuple6(
///
/// ## Examples
///
-/// > typed_tuple6(from(tuple(1, 2, 3, 4, 5, 6)), int, int, int, int, int, int)
-/// Ok(tuple(1, 2, 3, 4, 5, 6))
+/// > typed_tuple6(from(#(1, 2, 3, 4, 5, 6)), int, int, int, int, int, int)
+/// Ok(#(1, 2, 3, 4, 5, 6))
///
-/// > typed_tuple6(from(tuple(1, 2.0, "3", 4, 5, 6)), int, float, string, int, int)
-/// Ok(tuple(1, 2.0, "3", 4, 5, 6))
+/// > typed_tuple6(from(#(1, 2.0, "3", 4, 5, 6)), int, float, string, int, int)
+/// Ok(#(1, 2.0, "3", 4, 5, 6))
///
-/// > typed_tuple6(from(tuple(1, 2)), int, float, string, int, int, int)
+/// > typed_tuple6(from(#(1, 2)), int, float, string, int, int, int)
/// Error("Expected a 6 element tuple, got a 2 element tuple")
///
/// > typed_tuple6(from(""), int, float, string, int, int, int)
diff --git a/src/gleam/iterator.gleam b/src/gleam/iterator.gleam
index a6af2ef..6aed5d2 100644
--- a/src/gleam/iterator.gleam
+++ b/src/gleam/iterator.gleam
@@ -493,7 +493,7 @@ fn do_index(
/// ## Examples
///
/// > from_list(["a", "b", "c"]) |> index |> to_list
-/// [tuple(0, "a"), tuple(1, "b"), tuple(2, "c")]
+/// [#(0, "a"), #(1, "b"), #(2, "c")]
///
pub fn index(over iterator: Iterator(element)) -> Iterator(#(Int, element)) {
iterator.continuation
@@ -636,7 +636,7 @@ fn do_zip(
/// ## Examples
///
/// > from_list(["a", "b", "c"]) |> zip(range(20, 30)) |> to_list
-/// [tuple("a", 20), tuple("b", 21), tuple("c", 22)]
+/// [#("a", 20), #("b", 21), #("c", 22)]
///
pub fn zip(left: Iterator(a), right: Iterator(b)) -> Iterator(#(a, b)) {
do_zip(left.continuation, right.continuation)
@@ -907,7 +907,7 @@ fn group_updater(
/// ## Examples
///
/// > from_list([1, 2, 3, 4, 5, 6]) |> group(by: fn(n) { n % 3 })
-/// map.from_list([tuple(0, [3, 6]), tuple(1, [1, 4]), tuple(2, [2, 5])])
+/// map.from_list([#(0, [3, 6]), #(1, [1, 4]), #(2, [2, 5])])
///
pub fn group(
in iterator: Iterator(element),
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam
index 0102d98..ea67ba5 100644
--- a/src/gleam/list.gleam
+++ b/src/gleam/list.gleam
@@ -254,9 +254,9 @@ pub fn map(list: List(a), with fun: fn(a) -> b) -> List(b) {
/// > map_fold(
/// over: [1, 2, 3],
/// from: 100,
-/// with: fn(i, memo) { tuple(i * 2, memo + i) }
+/// with: fn(i, memo) { #(i * 2, memo + i) }
/// )
-/// tuple([2, 4, 6], 106)
+/// #([2, 4, 6], 106)
/// ```
///
pub fn map_fold(
@@ -296,8 +296,8 @@ fn do_index_map(
///
/// ## Examples
///
-/// > index_map(["a", "b"], fn(i, x) { tuple(i, x) })
-/// [tuple(0, "a"), tuple(1, "b")]
+/// > index_map(["a", "b"], fn(i, x) { #(i, x) })
+/// [#(0, "a"), #(1, "b")]
///
pub fn index_map(list: List(a), with fun: fn(Int, a) -> b) -> List(b) {
do_index_map(list, fun, 0, [])
@@ -712,13 +712,13 @@ fn do_zip(xs: List(a), ys: List(b), acc: List(#(a, b))) -> List(#(a, b)) {
/// []
///
/// > zip([1, 2], [3])
-/// [tuple(1, 3)]
+/// [#(1, 3)]
///
/// > zip([1], [3, 4])
-/// [tuple(1, 3)]
+/// [#(1, 3)]
///
/// > zip([1, 2], [3, 4])
-/// [tuple(1, 3), tuple(2, 4)]
+/// [#(1, 3), #(2, 4)]
///
pub fn zip(xs: List(a), ys: List(b)) -> List(#(a, b)) {
do_zip(xs, ys, [])
@@ -740,7 +740,7 @@ pub fn zip(xs: List(a), ys: List(b)) -> List(#(a, b)) {
/// Error(LengthMismatch)
///
/// > strict_zip([1, 2], [3, 4])
-/// Ok([tuple(1, 3), tuple(2, 4)])
+/// Ok([#(1, 3), #(2, 4)])
///
pub fn strict_zip(
l1: List(a),
@@ -763,11 +763,11 @@ fn do_unzip(input, xs, ys) {
///
/// ## Examples
///
-/// > unzip([tuple(1, 2), tuple(3, 4)])
-/// tuple([1, 3], [2, 4])
+/// > unzip([#(1, 2), #(3, 4)])
+/// #([1, 3], [2, 4])
///
/// > unzip([])
-/// tuple([], [])
+/// #([], [])
///
pub fn unzip(input: List(#(a, b))) -> #(List(a), List(b)) {
do_unzip(input, [], [])
@@ -949,13 +949,13 @@ fn do_split(list: List(a), n: Int, taken: List(a)) -> #(List(a), List(a)) {
/// ## Examples
///
/// > split([6, 7, 8, 9], 0)
-/// tuple([], [6, 7, 8, 9])
+/// #([], [6, 7, 8, 9])
///
/// > split([6, 7, 8, 9], 2)
-/// tuple([6, 7], [8, 9])
+/// #([6, 7], [8, 9])
///
/// > split([6, 7, 8, 9], 4)
-/// tuple([6, 7, 8, 9], [])
+/// #([6, 7, 8, 9], [])
///
pub fn split(list list: List(a), at index: Int) -> #(List(a), List(a)) {
do_split(list, index, [])
@@ -985,10 +985,10 @@ fn do_split_while(
/// ## Examples
///
/// > split_while([1, 2, 3, 4, 5], fn(x) { x <= 3 })
-/// tuple([1, 2, 3], [4, 5])
+/// #([1, 2, 3], [4, 5])
///
/// > split_while([1, 2, 3, 4, 5], fn(x) { x <= 5 })
-/// tuple([1, 2, 3, 4, 5], [])
+/// #([1, 2, 3, 4, 5], [])
///
pub fn split_while(
list list: List(a),
@@ -1007,13 +1007,13 @@ pub fn split_while(
///
/// ## Examples
///
-/// > key_find([tuple("a", 0), tuple("b", 1)], "a")
+/// > key_find([#("a", 0), #("b", 1)], "a")
/// Ok(0)
///
-/// > key_find([tuple("a", 0), tuple("b", 1)], "b")
+/// > key_find([#("a", 0), #("b", 1)], "b")
/// Ok(1)
///
-/// > key_find([tuple("a", 0), tuple("b", 1)], "c")
+/// > key_find([#("a", 0), #("b", 1)], "c")
/// Error(Nil)
///
pub fn key_find(
@@ -1051,7 +1051,7 @@ fn do_pop(haystack, predicate, checked) {
/// ## Examples
///
/// > pop([1, 2, 3], fn(x) { x > 2 })
-/// Ok(tuple(3, [1, 2]))
+/// Ok(#(3, [1, 2]))
///
/// > pop([1, 2, 3], fn(x) { x > 4 })
/// Error(Nil)
@@ -1086,7 +1086,7 @@ fn do_pop_map(haystack, mapper, checked) {
/// ## Examples
///
/// > pop_map([[], [2], [3]], head)
-/// Ok(tuple(2, [[], [3]]))
+/// Ok(#(2, [[], [3]]))
///
/// > pop_map([[], []], head)
/// Error(Nil)
@@ -1109,13 +1109,13 @@ pub fn pop_map(
///
/// ## Examples
///
-/// > key_pop([tuple("a", 0), tuple("b", 1)], "a")
-/// Ok(tuple(0, [tuple("b", 1)])
+/// > key_pop([#("a", 0), #("b", 1)], "a")
+/// Ok(#(0, [#("b", 1)])
///
-/// > key_pop([tuple("a", 0), tuple("b", 1)], "b")
-/// Ok(tuple(1, [tuple("a", 0)])
+/// > key_pop([#("a", 0), #("b", 1)], "b")
+/// Ok(#(1, [#("a", 0)])
///
-/// > key_pop([tuple("a", 0), tuple("b", 1)], "c")
+/// > key_pop([#("a", 0), #("b", 1)], "c")
/// Error(Nil)
///
pub fn key_pop(
@@ -1142,11 +1142,11 @@ pub fn key_pop(
///
/// ## Examples
///
-/// > key_set([tuple(5, 0), tuple(4, 1)], 4, 100)
-/// [tuple(5, 0), tuple(4, 100)]
+/// > key_set([#(5, 0), #(4, 1)], 4, 100)
+/// [#(5, 0), #(4, 100)]
///
-/// > key_set([tuple(5, 0), tuple(4, 1)], 1, 100)
-/// [tuple(5, 0), tuple(4, 1), tuple(1, 100)]
+/// > key_set([#(5, 0), #(4, 1)], 1, 100)
+/// [#(5, 0), #(4, 1), #(1, 100)]
///
pub fn key_set(list: List(#(a, b)), key: a, value: b) -> List(#(a, b)) {
case list {
@@ -1242,7 +1242,7 @@ pub fn window(l: List(a), by n: Int) -> List(List(a)) {
///
/// ```
/// > window_by_2([1,2,3,4])
-/// [tuple(1, 2), tuple(2, 3), tuple(3, 4)]
+/// [#(1, 2), #(2, 3), #(3, 4)]
///
/// > window_by_2([1])
/// []
@@ -1501,7 +1501,7 @@ fn do_combination_pairs(items: List(a)) -> List(List(#(a, a))) {
///
/// ```
/// > combination_pairs([1, 2, 3])
-/// [tuple(1, 2), tuple(1, 3), tuple(2, 3)]
+/// [#(1, 2), #(1, 3), #(2, 3)]
/// ```
///
pub fn combination_pairs(items: List(a)) -> List(#(a, a)) {
diff --git a/src/gleam/map.gleam b/src/gleam/map.gleam
index 3d9917c..d51a78e 100644
--- a/src/gleam/map.gleam
+++ b/src/gleam/map.gleam
@@ -32,7 +32,7 @@ pub external type Map(key, value)
pub external fn size(Map(k, v)) -> Int =
"maps" "size"
-/// Converts the map to a list of 2-element tuples `tuple(key, value)`, one for
+/// Converts the map to a list of 2-element tuples `#(key, value)`, one for
/// each key-value pair in the map.
///
/// The tuples in the list have no specific order.
@@ -43,12 +43,12 @@ pub external fn size(Map(k, v)) -> Int =
/// []
///
/// > new() |> insert("key", 0) |> to_list()
-/// [tuple("key", 0)]
+/// [#("key", 0)]
///
pub external fn to_list(Map(key, value)) -> List(#(key, value)) =
"maps" "to_list"
-/// Converts a list of 2-element tuples `tuple(key, value)` to a map.
+/// Converts a list of 2-element tuples `#(key, value)` to a map.
///
/// If two tuples have the same key the last one in the list will be the one
/// that is present in the map.
@@ -105,10 +105,10 @@ external fn erl_insert(key, value, Map(key, value)) -> Map(key, value) =
/// ## Examples
///
/// > new() |> insert("a", 0) |> to_list
-/// [tuple("a", 0)]
+/// [#("a", 0)]
///
/// > new() |> insert("a", 0) |> insert("a", 5) |> to_list
-/// [tuple("a", 5)]
+/// [#("a", 5)]
///
pub fn insert(into map: Map(k, v), for key: k, insert value: v) -> Map(k, v) {
erl_insert(key, value, map)
@@ -122,10 +122,10 @@ external fn erl_map_values(fn(key, a) -> b, Map(key, value)) -> Map(key, b) =
///
/// ## Examples
///
-/// > [tuple(3, 3), tuple(2, 4)]
+/// > [#(3, 3), #(2, 4)]
/// > |> from_list
/// > |> map_values(fn(key, value) { key * value })
-/// [tuple(3, 9), tuple(2, 8)]
+/// [#(3, 9), #(2, 8)]
///
///
pub fn map_values(in map: Map(k, v), with fun: fn(k, v) -> w) -> Map(k, w) {
@@ -140,7 +140,7 @@ pub fn map_values(in map: Map(k, v), with fun: fn(k, v) -> w) -> Map(k, w) {
///
/// ## Examples
///
-/// > keys([tuple("a", 0), tuple("b", 1)])
+/// > keys([#("a", 0), #("b", 1)])
/// ["a", "b"]
///
pub external fn keys(Map(keys, v)) -> List(keys) =
@@ -154,7 +154,7 @@ pub external fn keys(Map(keys, v)) -> List(keys) =
///
/// ## Examples
///
-/// > keys(from_list([tuple("a", 0), tuple("b", 1)]))
+/// > keys(from_list([#("a", 0), #("b", 1)]))
/// [0, 1]
///
pub external fn values(Map(k, values)) -> List(values) =
@@ -171,13 +171,13 @@ external fn erl_filter(
///
/// ## Examples
///
-/// > from_list([tuple("a", 0), tuple("b", 1)])
+/// > from_list([#("a", 0), #("b", 1)])
/// > |> filter(fn(key, value) { value != 0 })
-/// from_list([tuple("b", 1)])
+/// from_list([#("b", 1)])
///
-/// > from_list([tuple("a", 0), tuple("b", 1)])
+/// > from_list([#("a", 0), #("b", 1)])
/// > |> filter(fn(key, value) { True })
-/// from_list([tuple("a", 0), tuple("b", 1)])
+/// from_list([#("a", 0), #("b", 1)])
///
pub fn filter(in map: Map(k, v), for property: fn(k, v) -> Bool) -> Map(k, v) {
erl_filter(property, map)
@@ -191,13 +191,13 @@ external fn erl_take(List(k), Map(k, v)) -> Map(k, v) =
///
/// ## Examples
///
-/// > from_list([tuple("a", 0), tuple("b", 1)])
+/// > from_list([#("a", 0), #("b", 1)])
/// > |> take(["b"])
-/// from_list([tuple("b", 1)])
+/// from_list([#("b", 1)])
///
-/// > from_list([tuple("a", 0), tuple("b", 1)])
+/// > from_list([#("a", 0), #("b", 1)])
/// > |> take(["a", "b", "c"])
-/// from_list([tuple("a", 0), tuple("b", 1)])
+/// from_list([#("a", 0), #("b", 1)])
///
pub fn take(from map: Map(k, v), keeping desired_keys: List(k)) -> Map(k, v) {
erl_take(desired_keys, map)
@@ -210,10 +210,10 @@ pub fn take(from map: Map(k, v), keeping desired_keys: List(k)) -> Map(k, v) {
///
/// ## Examples
///
-/// > let a = from_list([tuple("a", 0), tuple("b", 1)])
-/// > let b = from_list([tuple("b", 2), tuple("c", 3)])
+/// > let a = from_list([#("a", 0), #("b", 1)])
+/// > let b = from_list([#("b", 2), #("c", 3)])
/// > merge(a, b)
-/// from_list([tuple("a", 0), tuple("b", 2), tuple("c", 3)])
+/// from_list([#("a", 0), #("b", 2), #("c", 3)])
///
pub external fn merge(into: Map(k, v), merge: Map(k, v)) -> Map(k, v) =
"maps" "merge"
@@ -226,11 +226,11 @@ external fn erl_delete(k, Map(k, v)) -> Map(k, v) =
///
/// ## Examples
///
-/// > delete([tuple("a", 0), tuple("b", 1)], "a")
-/// from_list([tuple("b", 1)])
+/// > delete([#("a", 0), #("b", 1)], "a")
+/// from_list([#("b", 1)])
///
-/// > delete([tuple("a", 0), tuple("b", 1)], "c")
-/// from_list([tuple("a", 0), tuple("b", 1)])
+/// > delete([#("a", 0), #("b", 1)], "c")
+/// from_list([#("a", 0), #("b", 1)])
///
pub fn delete(from map: Map(k, v), delete key: k) -> Map(k, v) {
erl_delete(key, map)
@@ -241,13 +241,13 @@ pub fn delete(from map: Map(k, v), delete key: k) -> Map(k, v) {
///
/// ## Examples
///
-/// > drop([tuple("a", 0), tuple("b", 1)], ["a"])
-/// from_list([tuple("b", 2)])
+/// > drop([#("a", 0), #("b", 1)], ["a"])
+/// from_list([#("b", 2)])
///
-/// > delete([tuple("a", 0), tuple("b", 1)], ["c"])
-/// from_list([tuple("a", 0), tuple("b", 1)])
+/// > delete([#("a", 0), #("b", 1)], ["c"])
+/// from_list([#("a", 0), #("b", 1)])
///
-/// > drop([tuple("a", 0), tuple("b", 1)], ["a", "b", "c"])
+/// > drop([#("a", 0), #("b", 1)], ["a", "b", "c"])
/// from_list([])
///
pub fn drop(from map: Map(k, v), drop disallowed_keys: List(k)) -> Map(k, v) {
@@ -267,13 +267,13 @@ pub fn drop(from map: Map(k, v), drop disallowed_keys: List(k)) -> Map(k, v) {
/// > Error(Nil) -> 0
/// > }
/// > }
-/// > let map = from_list([tuple("a", 0)])
+/// > let map = from_list([#("a", 0)])
/// >
/// > update(map, "a" increment)
-/// from_list([tuple("a", 1)])
+/// from_list([#("a", 1)])
///
/// > update(map, "b" increment)
-/// from_list([tuple("a", 0), tuple("b", 0)])
+/// from_list([#("a", 0), #("b", 0)])
///
pub fn update(
in map: Map(k, v),
@@ -302,7 +302,7 @@ fn do_fold(list: List(#(k, v)), initial: acc, fun: fn(k, v, acc) -> acc) -> acc
///
/// # Examples
///
-/// > let map = from_list([tuple("a", 1), tuple("b", 3), tuple("c", 9)])
+/// > let map = from_list([#("a", 1), #("b", 3), #("c", 9)])
/// > fold(map, 0, fn(key, value, accumulator) { accumulator + value })
/// 13
///
diff --git a/src/gleam/option.gleam b/src/gleam/option.gleam
index f597563..f74abbd 100644
--- a/src/gleam/option.gleam
+++ b/src/gleam/option.gleam
@@ -142,8 +142,8 @@ pub fn flatten(option: Option(Option(a))) -> Option(a) {
/// > then(Some(1), fn(x) { Some(x + 1) })
/// Some(2)
///
-/// > then(Some(1), fn(x) { Some(tuple("a", x)) })
-/// Some(tuple("a", 1))
+/// > then(Some(1), fn(x) { Some(#("a", x)) })
+/// Some(#("a", 1))
///
/// > then(Some(1), fn(x) { None })
/// None
diff --git a/src/gleam/pair.gleam b/src/gleam/pair.gleam
index 644a7f9..6143ee9 100644
--- a/src/gleam/pair.gleam
+++ b/src/gleam/pair.gleam
@@ -2,7 +2,7 @@
///
/// ## Examples
///
-/// > first(tuple(1, 2))
+/// > first(#(1, 2))
/// 1
///
pub fn first(pair: #(a, b)) -> a {
@@ -14,7 +14,7 @@ pub fn first(pair: #(a, b)) -> a {
///
/// ## Examples
///
-/// > second(tuple(1, 2))
+/// > second(#(1, 2))
/// 2
///
pub fn second(pair: #(a, b)) -> b {
@@ -26,8 +26,8 @@ pub fn second(pair: #(a, b)) -> b {
///
/// ## Examples
///
-/// > swap(tuple(1, 2))
-/// tuple(2, 1)
+/// > swap(#(1, 2))
+/// #(2, 1)
///
pub fn swap(pair: #(a, b)) -> #(b, a) {
let #(a, b) = pair
@@ -39,7 +39,7 @@ pub fn swap(pair: #(a, b)) -> #(b, a) {
///
/// ## Examples
///
-/// > tuple(1, 2) |> map_first(fn(n) { n * 2 })
+/// > #(1, 2) |> map_first(fn(n) { n * 2 })
/// 2
///
pub fn map_first(of pair: #(a, b), with fun: fn(a) -> c) -> #(c, b) {
@@ -52,7 +52,7 @@ pub fn map_first(of pair: #(a, b), with fun: fn(a) -> c) -> #(c, b) {
///
/// ## Examples
///
-/// > tuple(1, 2) |> map_second(fn(n) { n * 2 })
+/// > #(1, 2) |> map_second(fn(n) { n * 2 })
/// 4
///
pub fn map_second(of pair: #(a, b), with fun: fn(b) -> c) -> #(a, c) {
diff --git a/src/gleam/queue.gleam b/src/gleam/queue.gleam
index ef02796..6b12cfb 100644
--- a/src/gleam/queue.gleam
+++ b/src/gleam/queue.gleam
@@ -125,12 +125,12 @@ pub fn push_front(onto queue: Queue(a), this item: a) -> Queue(a) {
/// > |> queue.push_back(0)
/// > |> queue.push_back(1)
/// > |> queue.pop_back()
-/// Ok(tuple(1, queue.push_front(queue.new(), 0)))
+/// Ok(#(1, queue.push_front(queue.new(), 0)))
///
/// > queue.new()
/// > |> queue.push_front(0)
/// > |> queue.pop_back()
-/// Ok(tuple(0, queue.new()))
+/// Ok(#(0, queue.new()))
///
/// > queue.new()
/// > |> queue.pop_back()
@@ -159,12 +159,12 @@ pub fn pop_back(from queue: Queue(a)) -> Result(#(a, Queue(a)), Nil) {
/// > |> queue.push_front(1)
/// > |> queue.push_front(0)
/// > |> queue.pop_front()
-/// Ok(tuple(0, queue.push_back(queue.new(), 1)))
+/// Ok(#(0, queue.push_back(queue.new(), 1)))
///
/// > queue.new()
/// > |> queue.push_back(0)
/// > |> queue.pop_front()
-/// Ok(tuple(0, queue.new()))
+/// Ok(#(0, queue.new()))
///
/// > queue.new()
/// > |> queue.pop_back()
diff --git a/src/gleam/result.gleam b/src/gleam/result.gleam
index 402c96e..47fe956 100644
--- a/src/gleam/result.gleam
+++ b/src/gleam/result.gleam
@@ -128,8 +128,8 @@ pub fn flatten(result: Result(Result(a, e), e)) -> Result(a, e) {
/// > then(Ok(1), fn(x) { Ok(x + 1) })
/// Ok(2)
///
-/// > then(Ok(1), fn(x) { Ok(tuple("a", x)) })
-/// Ok(tuple("a", 1))
+/// > then(Ok(1), fn(x) { Ok(#("a", x)) })
+/// Ok(#("a", 1))
///
/// > then(Ok(1), fn(x) { Error("Oh no") })
/// Error("Oh no")
diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam
index ad58aae..ce7cd64 100644
--- a/src/gleam/string.gleam
+++ b/src/gleam/string.gleam
@@ -274,7 +274,7 @@ external fn erl_split(String, String) -> List(String) =
/// ## Examples
///
/// > split_once("home/gleam/desktop/", on: "/")
-/// Ok(tuple("home", "gleam/desktop/"))
+/// Ok(#("home", "gleam/desktop/"))
///
/// > split_once("home/gleam/desktop/", on: "?")
/// Error(Nil)
@@ -439,7 +439,7 @@ pub fn trim_right(string: String) -> String {
///
/// ## Examples
/// > pop_grapheme("gleam")
-/// Ok(tuple("g", "leam"))
+/// Ok(#("g", "leam"))
///
/// > pop_grapheme("")
/// Error(Nil)
diff --git a/src/gleam/uri.gleam b/src/gleam/uri.gleam
index d9fc1ac..a65d753 100644
--- a/src/gleam/uri.gleam
+++ b/src/gleam/uri.gleam
@@ -94,7 +94,7 @@ external fn erl_parse_query(String) -> Dynamic =
/// ```
/// > parse_query("a=1&b=2")
///
-/// Ok([tuple("a", "1"), tuple("b", "2")])
+/// Ok([#("a", "1"), #("b", "2")])
/// ```
///
pub fn parse_query(query: String) -> Result(List(#(String, String)), Nil) {
@@ -132,7 +132,7 @@ external fn erl_query_to_string(
/// ## Examples
///
/// ```
-/// > query_to_string([tuple("a", "1"), tuple("b", "2")])
+/// > query_to_string([#("a", "1"), #("b", "2")])
///
/// "a=1&b=2"
/// ```