Skip to content

Commit

Permalink
fix: typo in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
CAIMEOX authored and Yoorkin committed Mar 11, 2024
1 parent e5fd87c commit a333743
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions list/list.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ test "take" {
/// # Example
///
/// ```
/// drop(from_array([1, 2, 3, 4, 5]), 3)
/// from_array([1, 2, 3, 4, 5]).drop(3)
/// ```
pub fn drop[T](self : List[T], n : Int) -> List[T] {
if n <= 0 {
Expand Down Expand Up @@ -761,7 +761,7 @@ test "take_while" {
/// # Example
///
/// ```
/// from_array([1, 2, 3, 4].drop_while(fn(x) { x < 3 })
/// from_array([1, 2, 3, 4]).drop_while(fn(x) { x < 3 })
/// ```
pub fn drop_while[T](self : List[T], p : (T) -> Bool) -> List[T] {
match self {
Expand All @@ -780,7 +780,7 @@ test "drop_while" {
/// # Example
///
/// ```
/// let ls = from_array([1, 2, 3, 4, 5]).scan(fn(acc, x) { acc + x }, 0)
/// let ls = from_array([1, 2, 3, 4, 5])
/// ls.scan(fn(acc, x) { acc + x }, 0)
/// ```
pub fn scan[T, E](self : List[T], f : (E, T) -> E, init : E) -> List[E] {
Expand Down

0 comments on commit a333743

Please sign in to comment.