83template<
class F,
class...Ts, std::size_t...Is>
85 F func, std::index_sequence<Is...>)
105template<
class F,
class...Ts>
129 for (
const auto & item : v)
157template <
typename Iterator>
159 ->
DynList<std::decay_t<
decltype(*begin)>>
162 for (
auto it = begin; it != end; ++it)
179 for (
const auto & item : v)
195template <
typename Container>
196[[
nodiscard]]
inline std::vector<typename Container::Item_Type>
199 std::vector<typename Container::Item_Type>
ret;
200 for (
const auto & item : container)
215template <
typename T,
class Op>
217 -> std::vector<std::decay_t<
decltype(op(v[0]))>>
219 using ResultType = std::decay_t<
decltype(op(v[0]))>;
220 std::vector<ResultType>
ret;
221 ret.reserve(v.size());
222 for (
const auto & item : v)
223 ret.push_back(op(item));
236template <
typename T,
typename...
Args>
239 return {
static_cast<T>(std::forward<Args>(
args))... };
251template <
typename T,
typename...
Args>
312template<
unsigned Size>
333template<
typename...
Types>
340template<
class Container,
typename T,
typename...
U,
unsigned...
I>
360template<
class Container,
typename T,
typename...
U>
376template<
typename T,
typename...
U>
391template<
typename T,
typename...
U>
408template <
typename StlContainer>
413 for (
const auto & item : container)
430 for (
const auto & item :
l)
447 for (
const auto & item :
l)
468 for (
size_t i = 0; i < arr.
size(); ++i)
469 ret.push_back(arr[i]);
491 for (
const auto & item : v)
Simple dynamic array with automatic resizing and functional operations.
size_t size() const noexcept
Return the current dimension of array.
Dynamic singly linked list with functional programming support.
T & append(const T &item)
Append a new item by copy.
Singly linked list implementations with head-tail access.
Main namespace for Aleph-w library functions.
Array< T > tuple_to_array(const std::tuple< T, U... > &t)
Convert a tuple to an Array.
auto range_to_DynList(Iterator begin, Iterator end) -> DynList< std::decay_t< decltype(*begin)> >
Convert an iterator range to a DynList.
DynList< T > to_DynList(const Array< T > &a)
Convert an Array to a DynList.
DynList< T > list_to_DynList(const std::list< T > &l)
Convert a std::list to a DynList.
typename make_index_tuple< sizeof...(Types)>::type to_index_tuple
Convenience alias to generate an index tuple from a parameter pack.
std::vector< T > variadic_to_vector(Args &&... args)
Convert a variadic parameter pack to a std::vector.
DynList< T > variadic_to_DynList(Args &&... args)
Convert a variadic parameter pack to a DynList.
std::decay_t< typename HeadC::Item_Type > T
DynList< T > vector_to_DynList(const std::vector< T > &v)
Convert a std::vector to a DynList.
DynList< T > tuple_to_dynlist(const std::tuple< T, U... > &t)
Convert a tuple to a DynList.
auto stl_container_to_dynList(const StlContainer &container) -> DynList< typename StlContainer::value_type >
Convert any STL container to a DynList.
Array< typename C::Item_Type > to_Array(const C &c)
Convert a container to an Array.
Container tuple_to_container(const std::tuple< T, U... > &t)
Convert a tuple to an Aleph-w container.
DynArray< T > vector_to_DynArray(const std::vector< T > &v)
Convert a std::vector to a DynArray.
std::vector< T > DynArray_to_vector(const DynArray< T > &arr)
Convert a DynArray to a std::vector.
std::list< T > DynList_to_list(const DynList< T > &l)
Convert a DynList to a std::list.
void tuple_for_each(const std::tuple< Ts... > &tuple, F func, std::index_sequence< Is... >)
Apply a function to each element in a tuple (tuple first).
std::vector< typename C::Item_Type > to_vector(const C &c)
Convert a container to a std::vector.
DynList< T > maps(const C &c, Op op)
Classic map operation.
auto map_vector(const std::vector< T > &v, Op op) -> std::vector< std::decay_t< decltype(op(v[0]))> >
Map a function over a std::vector.
A type that represents a parameter pack of zero or more integers.
Unary metafunction that generates an index_tuple containing [0, Size).
typename make_index_tuple< Size-1 >::type::template append< Size-1 > type
Dynamic array container with automatic resizing.
Lazy and scalable dynamic array implementation.
Dynamic doubly linked list implementation.
Dynamic set implementations based on balanced binary search trees.