# zip two lists producing a table where the 'key' list are the keys. export def "zip-keys" [ # -> list keys: list ] { zip $keys | reduce -f {} { |it, acc| $acc | upsert $it.1 $it.0 } } # split a table into equally sized chunks export def chunk [chunk_size:int] { window $chunk_size --stride $chunk_size -r }