group for filters

Groups input into groups of `group_size`.

Signature

> group (group_size)

Parameters

  • group_size: the size of each group

Examples

Group the a list by pairs

> [1 2 3 4] | group 2
╭───┬───────────╮
│ 0 │ ╭───┬───╮ │
│   │ │ 01 │ │
│   │ │ 12 │ │
│   │ ╰───┴───╯ │
│ 1 │ ╭───┬───╮ │
│   │ │ 03 │ │
│   │ │ 14 │ │
│   │ ╰───┴───╯ │
╰───┴───────────╯