pub fn repeat_with<'a, L, F>(f: F) -> RepeatWith<'a, L, F>Expand description
Creates a new lender that repeats elements endlessly by
applying the provided closure, the repeater,
F: FnMut() -> A.
The repeat_with() function calls the repeater over and
over again.
The Lender version of
iter::repeat_with().
ยงExamples
let mut lender = lender::repeat_with::<
lend!(&'lend i32), _,
>(|| &0);
assert_eq!(lender.next(), Some(&0));