breadthFirstFlatMap

higher order function for mapping via breadth-fisrt search

breadthFirstFlatMap
(
alias func
Ts...
)
(
return auto ref Ts ts
)

Examples

breadth-first map iterates by top-to-bottom search.

enum t = tuple(1,
               tuple(
                   tuple(
                       4,
                       tuple(
                           7)),
                   2),
               tuple(
                   3,
                   tuple(
                       5,
                       6)));
static assert(breadthFirstFlatMap!(x => x)(t) == tuple(1, 2, 3, 4, 5, 6, 7));

Meta