mrdocs::dom::TransformArray
Return a new dom::Array based on a transformed lazy array implementation.
Synopsis
Declared in <mrdocs/Dom/LazyArray.hpp>
template<
std::ranges::random_access_range T,
class F>
requires std::invocable<F, std::ranges::range_value_t<T>> &&
HasStandaloneValueFrom<std::invoke_result_t<F, std::ranges::range_value_t<T>>>
Array
TransformArray(
T const& arr,
F const& f);
Return Value
A new dom::Array whose elements are the result of applying the transform function to each element in the underlying range.
Parameters
Name |
Description |
arr |
The underlying range of elements. |
f |
The transform function to apply to each element before converting it to a dom::Value. |
Created with MrDocs