pub fn drop_break<T: Clone, F>(list: &[T], pred: F) -> Vec<T> // Clumsy function
    where F: Fn(&T) -> bool {
        for item in 0 .. list.len() {
            if ! pred(&list[item]) {
                return collect_as_vector(list, (item + 1, list.len() - 1));
            }
        }
        vec![]
}
/// Iterate over a list of items, returning the remaining items after a
/// predicate yields FALSE.
/// # Examples
/// ```
/// use citadel::prelude;
/// let one_two_three = prelude::drop_break(&[4, 5, 6, 1, 2, 3], |x: &usize| -> bool {*x != 6});
/// ```
Iterate over a list of items, returning the remaining items after a
predicate yields FALSE.
Iterate over a list of items returning the remaining items after a predicate yields FALSE .
pub fn drop_break<T: Clone, F>(list: &[T], pred: F) -> Vec<T> // Clumsy function
    where F: Fn(&T) -> bool {
        for item in 0 .. list.len() {
            if ! pred(&list[item]) {
                return collect_as_vector(list, (item + 1, list.len() - 1));
            }
        }
        vec![]
}
pub fn drop_break < T : Clone , F > ( list : & [ T ] , pred : F ) -> Vec < T > // Clumsy function where F : Fn ( & T ) -> bool { for item in 0 .. list . len ( ) { if ! pred ( & list [ item ] ) { return collect_as_vector ( list , ( item + 1 , list . len ( ) - 1 ) ) ; } } vec ! [ ] }
Iterate over a list of items, returning the remaining items after a
predicate yields FALSE.
Iterate over a list of items returning the remaining items after a predicate yields FALSE .
list
&[T]
pred
F
examples
None