From 985f96325f4f2c10d289c57bd4ee516e9dbb8c5e Mon Sep 17 00:00:00 2001 From: Muqiu Han Date: Mon, 11 Mar 2024 13:45:33 +0800 Subject: [PATCH] fix: typo in comment --- stack/stack.mbt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/stack/stack.mbt b/stack/stack.mbt index 28964345c..f4580522d 100644 --- a/stack/stack.mbt +++ b/stack/stack.mbt @@ -169,7 +169,7 @@ test "push" { @assertion.assert_eq(s.len, 1)? } -/// Push a list into the stack` +/// Push a list into the stack /// /// # Example /// @@ -446,7 +446,7 @@ test "iter" { } } -/// Iterates over the list with index. +/// Iterates over the stack with index. pub fn iteri[T](self : Stack[T], f : (Int, T) -> Unit) { self.elements.iteri(f) } @@ -553,8 +553,8 @@ test "map" { )? } -/// Checks if all elements of the list satisfy the predicate f. -/// If the list is empty, return true. +/// Checks if all elements of the stack satisfy the predicate f. +/// If the stack is empty, return true. /// /// NOTE: Since the current standard library List lacks the forall function, /// this function internally implements the forall function of List. @@ -585,11 +585,7 @@ test "forall" { )? } -/// Checks if all elements of the list satisfy the predicate f. -/// If the list is empty, return true. -/// -/// NOTE: Since the current standard library List lacks the forall function, -/// this function internally implements the forall function of List. +/// Reverse stack /// /// # Example ///