//! Utility functions
/// Check if a slice is strictly increasing or non-decreasing.
///
/// - `STRICTLY = true`: check for strictly increasing (no duplicates allowed)
/// - `STRICTLY = false`: check for non-decreasing (duplicates allowed)
///
/// Returns `(is_valid, first_invalid_pos)` where `is_valid` indicates if the slice
/// meets the requirement, and `first_invalid_pos` is the index of the first violation.