chunks

Generate a tuple of tuples of chunkSize.

  1. auto chunks(T args)
    template chunks(size_t chunkSize)
    pure nothrow @safe
    chunks
    (
    T...
    )
    ()
    if (
    args.length >= chunkSize
    )
  2. auto chunks(T args)
  3. auto chunks(T args)

Members

Functions

chunks
auto chunks(T args)
Undocumented in source. Be warned that the author may not have intended to support it.
chunks
auto chunks(T args)
Undocumented in source. Be warned that the author may not have intended to support it.
chunks
auto chunks(T args)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

auto c1 = chunks!2(0, 1, 2, 3, 4, 5);

assert(c1 == tuple(tuple(0, 1), tuple(2, 3), tuple(4, 5)));

auto c2 = chunks!3(false, "1", 2.0, 3, '4', 5);

assert(c2 == tuple(tuple(false, "1", 2.0), tuple(3, '4', 5)));

enum c4 = chunks!4(false, "1", 2.0, 3, '4', 5);

static assert(c4 == tuple(tuple(false, "1", 2.0, 3), tuple('4', 5)));

Meta