Partitioned Enclose


 * In the APL2 family and many related dialects,  indicates Partition.

is a dyadic function which splits its right argument into differently sized pieces as determined by the left argument. It was introduced by NARS and appears in Dyalog APL and some newer dialects influenced by it.

Description
In the simplest case, and on a vector right argument, the corresponding element in the left argument indicates where divisions begin:

Non-Boolean left argument
Older dialects restrict the left argument to provide only the above functionality. However, the left argument can be interpreted as a count of how many partitions begin with a particular position:

Short left argument
The dialects that support this extension also allow omission of trailing zeros, which is useful if the partitioning vector is generated by where's inverse:

Long left argument
Additional trailing empty divisions are created by adding an additional division count corresponding to the position beyond the end of the right argument:

Split into lengths
The above extensions allow a simple definition of a split-into-lengths function:

Try it online!

Extension support
The following table shows which of the extensions to  introduced by Dyalog APL 18.0 are supported in various dialects. dzaima/APL doesn't support extended lengths but instead requires a short, assuming the first value is 1. This means it can't drop elements as the original Partitioned Enclose typically does, but also means it can't produce leading or trailing empty partitions.

Tutorials

 * APL Cultivation

Documentation

 * Dyalog