diff options
-rw-r--r-- | src/gleam/pair.gleam | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gleam/pair.gleam b/src/gleam/pair.gleam index 894e6a8..fb74614 100644 --- a/src/gleam/pair.gleam +++ b/src/gleam/pair.gleam @@ -3,8 +3,8 @@ /// ## Examples /// /// ```gleam -/// > first(#(1, 2)) -/// 1 +/// first(#(1, 2)) +/// // -> 1 /// ``` /// pub fn first(pair: #(a, b)) -> a { @@ -17,8 +17,8 @@ pub fn first(pair: #(a, b)) -> a { /// ## Examples /// /// ```gleam -/// > second(#(1, 2)) -/// 2 +/// second(#(1, 2)) +/// // -> 2 /// ``` /// pub fn second(pair: #(a, b)) -> b { @@ -31,8 +31,8 @@ pub fn second(pair: #(a, b)) -> b { /// ## Examples /// /// ```gleam -/// > swap(#(1, 2)) -/// #(2, 1) +/// swap(#(1, 2)) +/// // -> #(2, 1) /// ``` /// pub fn swap(pair: #(a, b)) -> #(b, a) { @@ -46,8 +46,8 @@ pub fn swap(pair: #(a, b)) -> #(b, a) { /// ## Examples /// /// ```gleam -/// > #(1, 2) |> map_first(fn(n) { n * 2 }) -/// #(2, 2) +/// #(1, 2) |> map_first(fn(n) { n * 2 }) +/// // -> #(2, 2) /// ``` /// pub fn map_first(of pair: #(a, b), with fun: fn(a) -> c) -> #(c, b) { @@ -61,8 +61,8 @@ pub fn map_first(of pair: #(a, b), with fun: fn(a) -> c) -> #(c, b) { /// ## Examples /// /// ```gleam -/// > #(1, 2) |> map_second(fn(n) { n * 2 }) -/// #(1, 4) +/// #(1, 2) |> map_second(fn(n) { n * 2 }) +/// // -> #(1, 4) /// ``` /// pub fn map_second(of pair: #(a, b), with fun: fn(b) -> c) -> #(a, c) { @@ -76,8 +76,8 @@ pub fn map_second(of pair: #(a, b), with fun: fn(b) -> c) -> #(a, c) { /// ## Examples /// /// ```gleam -/// > new(1, 2) -/// #(1, 2) +/// new(1, 2) +/// // -> #(1, 2) /// ``` /// pub fn new(first: a, second: b) -> #(a, b) { |