#slices Clear
Tags #php #kotlin #bash #go #sql #rust #typescript #html #java #python #files #utils #strings #http #concurrency #async #json #arrays #security #types #crypto #database #dates #format
Go slices package — Modern Helpers
`slices` (Go 1.21+) ships the iteration helpers everyone wrote by hand for years: Contains, Index, Sort, SortFunc, BinarySearch, Clone, Reverse, Equal, Max/Min.
Rust Slice Pattern: Borrow Without Copy
A slice (`&[T]`) is a borrowed view into a contiguous sequence. Pass `&v[..]` or just `&v` instead of `v.clone()` when the function only needs to read.
Rust windows / chunks — Sliding & Fixed
`windows(n)` yields every overlapping sub-slice of length n; `chunks(n)` yields non-overlapping chunks. Both work on slices for free, no extra crates.