mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-30 04:00:12 -05:00
679 B
679 B
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| language | chunklist - Functions - Configuration Language | docs-funcs-collection-chunklist | The chunklist function splits a single list into fixed-size chunks, returning a list of lists. |
chunklist Function
chunklist splits a single list into fixed-size chunks, returning a list
of lists.
chunklist(list, chunk_size)
Examples
> chunklist(["a", "b", "c", "d", "e"], 2)
[
[
"a",
"b",
],
[
"c",
"d",
],
[
"e",
],
]
> chunklist(["a", "b", "c", "d", "e"], 1)
[
[
"a",
],
[
"b",
],
[
"c",
],
[
"d",
],
[
"e",
],
]