1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use Init;
/// Operator to retrieve a fixed-size section of an array-like structure.
///
/// # Examples
///
/// Extracting elements from an array:
///
/// ```rust
/// use higher_order_functions::Section;
///
/// let a: [u32; 8] = [1, 2, 3, 4, 5, 6, 7, 8];
///
/// let arr: [u32; 4] = a.section(3); // Extracts 4 elements starting at a[3]
///
/// assert_eq!(arr, [4, 5, 6, 7]);
/// ```
/// Get a sized slice of an array.
///
/// # Panics
///
/// Panics if `N_OUT + offset > N`.