aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEthan Pang <ethan.pang@gitstart.com>2023-03-01 13:38:15 +0800
committerLouis Pilfold <louis@lpil.uk>2023-03-02 18:10:24 +0000
commit6bf57515bb4c644847da7551afcacf95f7417b3b (patch)
treef18a7f608babc0310879402b7cdafd524fafffc0 /src
parent8956d2ea0664570c6635da3f1cb645781e4850df (diff)
downloadgleam_stdlib-6bf57515bb4c644847da7551afcacf95f7417b3b.tar.gz
gleam_stdlib-6bf57515bb4c644847da7551afcacf95f7417b3b.zip
Update example and the argument label
Diffstat (limited to 'src')
-rw-r--r--src/gleam/iterator.gleam6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gleam/iterator.gleam b/src/gleam/iterator.gleam
index 318ffd1..89d50a8 100644
--- a/src/gleam/iterator.gleam
+++ b/src/gleam/iterator.gleam
@@ -1396,16 +1396,16 @@ fn do_length(over continuation: fn() -> Action(e), with length: Int) -> Int {
/// ## Examples
///
/// ```gleam
-/// > empty() |> count
+/// > empty() |> length
/// 0
/// ```
///
/// ```gleam
-/// > from_list([1, 2, 3, 4]) |> count
+/// > from_list([1, 2, 3, 4]) |> length
/// 4
/// ```
///
-pub fn length(in iterator: Iterator(e)) -> Int {
+pub fn length(over iterator: Iterator(e)) -> Int {
iterator.continuation
|> do_length(0)
}