aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorinoas <mail@inoas.com>2022-11-13 23:08:25 +0100
committerLouis Pilfold <louis@lpil.uk>2022-11-14 11:00:16 +0000
commitba9daf20bc986e405a98eabb389f14ee713060fc (patch)
tree6a9f9419d4047528322c06fd57d69645c918f6cb /src
parentca3486c16376c51e94d65fbb26107b095dfa3dba (diff)
downloadgleam_stdlib-ba9daf20bc986e405a98eabb389f14ee713060fc.tar.gz
gleam_stdlib-ba9daf20bc986e405a98eabb389f14ee713060fc.zip
do not specify self's module name
Diffstat (limited to 'src')
-rw-r--r--src/gleam/function.gleam14
-rw-r--r--src/gleam/int.gleam28
-rw-r--r--src/gleam/io.gleam6
-rw-r--r--src/gleam/list.gleam2
-rw-r--r--src/gleam/queue.gleam22
-rw-r--r--src/gleam/regex.gleam4
6 files changed, 38 insertions, 38 deletions
diff --git a/src/gleam/function.gleam b/src/gleam/function.gleam
index 14c7830..312dfba 100644
--- a/src/gleam/function.gleam
+++ b/src/gleam/function.gleam
@@ -81,13 +81,13 @@ pub fn tap(arg: a, effect: fn(a) -> b) -> a {
/// ## Example
///
/// ```gleam
-/// let doubler = fn() {
-/// fn(x: Int) { x * 2 }
-/// }
-///
-/// doubler()
-/// |> function.apply1(2)
-/// |> should.equal(4)
+/// > let doubler = fn() {
+/// > fn(x: Int) { x * 2 }
+/// > }
+/// >
+/// > doubler()
+/// > |> apply1(2)
+/// 4
/// ```
///
pub fn apply1(fun: fn(a) -> value, arg1: a) -> value {
diff --git a/src/gleam/int.gleam b/src/gleam/int.gleam
index 92af548..ca0881e 100644
--- a/src/gleam/int.gleam
+++ b/src/gleam/int.gleam
@@ -588,37 +588,37 @@ pub fn divide(dividend: Int, by divisor: Int) -> Result(Int, Nil) {
/// ## Examples
///
/// ```gleam
-/// > int.remainder(3, 2)
+/// > remainder(3, 2)
/// Ok(1)
/// ```
///
/// ```gleam
-/// > int.remainder(1, 0)
+/// > remainder(1, 0)
/// Error(Nil)
/// ```
///
/// ```gleam
-/// > int.remainder(10, -1)
+/// > remainder(10, -1)
/// Ok(0)
/// ```
///
/// ```gleam
-/// > int.remainder(13, by: 3)
+/// > remainder(13, by: 3)
/// Ok(1)
/// ```
///
/// ```gleam
-/// > int.remainder(-13, by: 3)
+/// > remainder(-13, by: 3)
/// Ok(-1)
/// ```
///
/// ```gleam
-/// > int.remainder(13, by: -3)
+/// > remainder(13, by: -3)
/// Ok(1)
/// ```
///
/// ```gleam
-/// > int.remainder(-13, by: -3)
+/// > remainder(-13, by: -3)
/// Ok(-1)
/// ```
///
@@ -640,37 +640,37 @@ pub fn remainder(dividend: Int, by divisor: Int) -> Result(Int, Nil) {
/// ## Examples
///
/// ```gleam
-/// > int.modulo(3, 2)
+/// > modulo(3, 2)
/// Ok(1)
/// ```
///
/// ```gleam
-/// > int.modulo(1, 0)
+/// > modulo(1, 0)
/// Error(Nil)
/// ```
///
/// ```gleam
-/// > int.modulo(10, -1)
+/// > modulo(10, -1)
/// Ok(0)
/// ```
///
/// ```gleam
-/// > int.modulo(13, by: 3)
+/// > modulo(13, by: 3)
/// Ok(1)
/// ```
///
/// ```gleam
-/// > int.modulo(-13, by: 3)
+/// > modulo(-13, by: 3)
/// Ok(2)
/// ```
///
/// ```gleam
-/// > int.modulo(13, by: -3)
+/// > modulo(13, by: -3)
/// Ok(-2)
/// ```
///
/// ```gleam
-/// > int.modulo(-13, by: -3)
+/// > modulo(-13, by: -3)
/// Ok(-1)
/// ```
///
diff --git a/src/gleam/io.gleam b/src/gleam/io.gleam
index dcc6433..b28da87 100644
--- a/src/gleam/io.gleam
+++ b/src/gleam/io.gleam
@@ -57,13 +57,13 @@ if javascript {
/// ## Example
///
/// ```gleam
-/// > io.debug("Hi mum")
+/// > debug("Hi mum")
/// // -> <<"Hi mum">>
/// "Hi mum"
/// ```
///
/// ```gleam
-/// > io.debug(Ok(1))
+/// > debug(Ok(1))
/// // -> {ok, 1}
/// Ok(1)
/// ```
@@ -72,7 +72,7 @@ if javascript {
/// > import list
/// > [1, 2]
/// > |> list.map(fn(x) { x + 1 })
-/// > |> io.debug
+/// > |> debug
/// > |> list.map(fn(x) { x * 2 })
/// // -> [2, 3]
/// [4, 6]
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam
index d83ff2d..3f5f566 100644
--- a/src/gleam/list.gleam
+++ b/src/gleam/list.gleam
@@ -682,7 +682,7 @@ fn do_index_fold(
///
/// ```gleam
/// ["a", "b", "c"]
-/// |> list.index_fold([], fn(acc, item, index) { ... })
+/// |> index_fold([], fn(acc, item, index) { ... })
/// ```
///
pub fn index_fold(
diff --git a/src/gleam/queue.gleam b/src/gleam/queue.gleam
index ad629cb..5570156 100644
--- a/src/gleam/queue.gleam
+++ b/src/gleam/queue.gleam
@@ -142,23 +142,23 @@ pub fn push_front(onto queue: Queue(a), this item: a) -> Queue(a) {
/// # Examples
///
/// ```gleam
-/// > queue.new()
-/// > |> queue.push_back(0)
-/// > |> queue.push_back(1)
-/// > |> queue.pop_back()
-/// Ok(#(1, queue.push_front(queue.new(), 0)))
+/// > new()
+/// > |> push_back(0)
+/// > |> push_back(1)
+/// > |> pop_back()
+/// Ok(#(1, push_front(new(), 0)))
/// ```
///
/// ```gleam
-/// > queue.new()
-/// > |> queue.push_front(0)
-/// > |> queue.pop_back()
-/// Ok(#(0, queue.new()))
+/// > new()
+/// > |> push_front(0)
+/// > |> pop_back()
+/// Ok(#(0, new()))
/// ```
///
/// ```gleam
-/// > queue.new()
-/// > |> queue.pop_back()
+/// > new()
+/// > |> pop_back()
/// Error(Nil)
/// ```
///
diff --git a/src/gleam/regex.gleam b/src/gleam/regex.gleam
index bebde01..3df42bb 100644
--- a/src/gleam/regex.gleam
+++ b/src/gleam/regex.gleam
@@ -160,8 +160,8 @@ if javascript {
/// ## Examples
///
/// ```gleam
-/// > assert Ok(re) = regex.from_string("[oi]n a (\\w+)")
-/// > regex.scan(with: re, content: "I am on a boat in a lake.")
+/// > assert Ok(re) = from_string("[oi]n a (\\w+)")
+/// > scan(with: re, content: "I am on a boat in a lake.")
/// [
/// Match(
/// content: "on a boat",