This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
// in the end, print all combinations from this vector ([0, 1, 0, 1, 1, 0]), | |
// only considering entries != 0 | |
// resulting in | |
// [0, 1, 0, 0, 0, 0], | |
// [0, 0, 0, 1, 0, 0], [0, 1, 0, 1, 0, 0], | |
// [0, 0, 0, 0, 1, 0], [0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 1, 0], [0, 1, 0, 1, 1, 0] | |
let v = vec![false, true, false, true, true, false]; | |
// v |