rangeless::fn
Combining

Functions

impl::concat rangeless::fn::concat ()
 Flatten the result of group_all_by or group_adjacent_by. More...
 
template<typename Iterable >
impl::append< Iterable > rangeless::fn::append (Iterable next)
 Yield elements of next after elements of arg. More...
 
template<typename Iterable , typename BinaryFn >
impl::zip_with< Iterable, BinaryFn > rangeless::fn::zip_with (Iterable second, BinaryFn fn)
 Yield pairs of elements, (up to end of the shorter range) More...
 
template<typename BinaryFn >
impl::zip_adjacent< BinaryFn > rangeless::fn::zip_adjacent (BinaryFn fn)
 Yield invocations of fn over pairs of adjacent inputs. More...
 
template<typename Iterable , typename BinaryFn >
impl::cartesian_product_with< Iterable, BinaryFn > rangeless::fn::cartesian_product_with (Iterable second, BinaryFn fn)
 

Detailed Description

Function Documentation

◆ append()

template<typename Iterable >
impl::append<Iterable> rangeless::fn::append ( Iterable  next)

Yield elements of next after elements of arg.

auto res = vec_t{{1,2}}
% fn::append( vec_t{{3}} )
VERIFY((res == vec_t{{1,2,3}}));

Definition at line 4307 of file fn.hpp.

◆ cartesian_product_with()

template<typename Iterable , typename BinaryFn >
impl::cartesian_product_with<Iterable, BinaryFn> rangeless::fn::cartesian_product_with ( Iterable  second,
BinaryFn  fn 
)

Definition at line 4346 of file fn.hpp.

◆ concat()

impl::concat rangeless::fn::concat ( )
inline

Flatten the result of group_all_by or group_adjacent_by.

Given a ContainerA<ContainerB<...>>, move all elements and return ContainerB<...>.

Given a seq-of-iterables seq<In>, compose seq<Out> that will lazily yield elements of each iterable in seq.

Definition at line 4291 of file fn.hpp.

◆ zip_adjacent()

template<typename BinaryFn >
impl::zip_adjacent<BinaryFn> rangeless::fn::zip_adjacent ( BinaryFn  fn)

Yield invocations of fn over pairs of adjacent inputs.

Definition at line 4339 of file fn.hpp.

◆ zip_with()

template<typename Iterable , typename BinaryFn >
impl::zip_with<Iterable, BinaryFn> rangeless::fn::zip_with ( Iterable  second,
BinaryFn  fn 
)

Yield pairs of elements, (up to end of the shorter range)

auto res = vec_t{{1,2}}
% fn::zip_with( vec_t{{3,4,5}}, [](int x, int y)
{
return x*10 + y;
})
VERIFY((res == vec_t{{13, 24}}));

Definition at line 4326 of file fn.hpp.