Skip to content

Instantly share code, notes, and snippets.

@wader
Created September 4, 2021 08:58
Show Gist options
  • Save wader/2c828f960a5559ab2db68896142e6c47 to your computer and use it in GitHub Desktop.
Save wader/2c828f960a5559ab2db68896142e6c47 to your computer and use it in GitHub Desktop.
def _chunk($size):
( range(
( (length / $size) | ceil
| if . == 0 then 1 end
)
) as $i
| .[$i * $size:($i + 1) * $size]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment