From 6bf57515bb4c644847da7551afcacf95f7417b3b Mon Sep 17 00:00:00 2001 From: Ethan Pang Date: Wed, 1 Mar 2023 13:38:15 +0800 Subject: Update example and the argument label --- src/gleam/iterator.gleam | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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) } -- cgit v1.2.3