Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
chen3feng committed Aug 17, 2023
1 parent 85d5cca commit b912147
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ indicating that a custom comparison function can be passed.
- `Copy` return a copies of specified slice
- `CopyTo` copies all elements in slice a to slice to, return the copied slice.
- `Fill` repeatedly fills a slice with the specified value
- `FillZero` fills each element in slice a with zero value.
- `FillPattern` repeatedly fills a slice with the specified pattern
- `Replace` replaces every element that equals to old with new
- `ReplaceIf` replaces every element that make preq returns true with new
Expand Down
1 change: 1 addition & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ func TestSkipList_ForEachMutable(t *testing.T) {
- `Copy` 返回切片的拷贝
- `CopyTo` 拷贝切片的内容到另一个切片
- `Fill` 用指定的值重复填充一个切片
- `FillZero` 用类型的零值重复填充一个切片
- `FillPattern` 用指定的模式重复填充一个切片
- `Replace` 替换所有等于指定值的元素为新值
- `ReplaceIf` 替换所有让函数返回 `true` 的元素为新值
Expand Down
2 changes: 1 addition & 1 deletion transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func Fill[T any](a []T, v T) {
}
}

// Fill fills each element in slice a with zero value.
// FillZero fills each element in slice a with zero value.
//
// Complexity: O(len(a)).
func FillZero[T any](a []T) {
Expand Down

0 comments on commit b912147

Please sign in to comment.