pub fn push_loop<F, U>(self, n: usize, func: F) -> Self
    where
        F: Fn(usize) -> U,
        U: component::Component,
    {
        (0..n).map(func).fold(self, |tag, x| tag.push(x))
    }
/// Push components as a loop from 0 to n (exclusive).
///
/// # Examples
///
/// ```
/// # use valerie::prelude::*;
/// # use valerie::prelude::components::*;
/// # use wasm_bindgen_test::*;
/// # fn ui() -> Node {
/// div!().push_loop(5, |x| h3!(x))
/// # .into()
/// # }
/// # wasm_bindgen_test_configure!(run_in_browser);
/// # #[wasm_bindgen_test]
/// # fn run() {
/// #     App::render_single(ui());
/// # }
/// ```
Push components as a loop from 0 to n (exclusive).
Push components as a loop from 0 to n ( exclusive ) .
pub fn push_loop<F, U>(self, n: usize, func: F) -> Self
    where
        F: Fn(usize) -> U,
        U: component::Component,
    {
        (0..n).map(func).fold(self, |tag, x| tag.push(x))
    }
pub fn push_loop < F , U > ( self , n : usize , func : F ) -> Self where F : Fn ( usize ) -> U , U : component :: Component , { ( 0 .. n ) . map ( func ) . fold ( self , | tag , x | tag . push ( x ) ) }
Push components as a loop from 0 to n (exclusive).
Push components as a loop from 0 to n ( exclusive ) .
self
n
usize
func
F
examples
None
use valerie::prelude::*;
None
use valerie::prelude::components::*;
None
use wasm_bindgen_test::*;
None
fn ui() -> node {
None
.into()
None
}
None
wasm_bindgen_test_configure!(run_in_browser);
None
#[wasm_bindgen_test]
None
fn run() {
None
app::render_single(ui());
None
}
None