function
boot.janet on line 2022 , column 1
(partition-by f x )
Partition values of `x` by a function `f` . Partitions split when
`f` applied to a value changes result when iterating to the next
value of `x` . Returns a new array of arrays.
`x` can be a bytes , indexed , fiber , or abstract type with suitable
`get` and `next` methods.
(partition-by even? [1 1 2 3 5 8 13 21 ])
# => @[@[1 1] @[2] @[3 5] @[8] @[13 21]]