diff options
author | Ethan Pang <ethan.pang@gitstart.com> | 2023-03-01 13:38:15 +0800 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2023-03-02 18:10:24 +0000 |
commit | 6bf57515bb4c644847da7551afcacf95f7417b3b (patch) | |
tree | f18a7f608babc0310879402b7cdafd524fafffc0 /src | |
parent | 8956d2ea0664570c6635da3f1cb645781e4850df (diff) | |
download | gleam_stdlib-6bf57515bb4c644847da7551afcacf95f7417b3b.tar.gz gleam_stdlib-6bf57515bb4c644847da7551afcacf95f7417b3b.zip |
Update example and the argument label
Diffstat (limited to 'src')
-rw-r--r-- | src/gleam/iterator.gleam | 6 |
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) } |