N-queens problem: Difference between revisions
Content added Content deleted
m (removed BASIC header, hoisted BBC BASIC and Applesoft BASIC) |
(→Using Iterators: Update code) |
||
Line 14,891: | Line 14,891: | ||
} |
} |
||
fn permutations<'a, T, I>(collection: I) -> Box<Iterator<Item=LinkedList<T>> + 'a> |
fn permutations<'a, T, I>(collection: I) -> Box<Iterator<dyn Item=LinkedList<T>> + 'a> |
||
where I: 'a + IntoIterator<Item=T> + Clone, |
where I: 'a + IntoIterator<Item=T> + Clone, |
||
T: 'a + PartialEq + Copy + Clone { |
T: 'a + PartialEq + Copy + Clone { |
||
Line 14,910: | Line 14,910: | ||
pub struct NQueens { |
pub struct NQueens { |
||
iterator: Box<Iterator<Item=NQueensSolution>> |
iterator: Box<Iterator<dyn Item=NQueensSolution>> |
||
} |
} |
||