use iof::{read, show}; fn main() { // Read an integer. let a: usize = read!(); // Read a vector of `a` integers. let b: Vec = read!(a); // Read a matrix of `a` rows and `b.iter().product()` columns. let c: Vec> = read!(a, b.iter().product()); let x: Vec>>> = read!(2, 2, 2, 2); assert_eq!(x.len(), 2); for (i, x) in x.into_iter().enumerate() { assert_eq!(x.len(), 2); for (j, x) in x.into_iter().enumerate() { assert_eq!(x.len(), 2); for (k, x) in x.into_iter().enumerate() { assert_eq!(x.len(), 2); for (l, x) in x.into_iter().enumerate() { assert_eq!(x, i + j + k + l); } } } } show!(a); show!(b); show!(c); show!((", ", a, " "), sep = [""], end = "\n"); show!(a, end = "\n"); show!(b, sep = [" :: "]); show!(c, sep = [" :: ", " | "]); }