Sorts values within a bucket. This could be represented with
LeftShift(Map(_.sort, Reduce(_ :: _, ???))
but backends tend to provide sort directly, so this avoids backends having
to recognize the pattern. We could provide an algebra
(Sort :+: QScript)#λ => QScript
so that a backend without a native sort could eliminate this node.
Sorts values within a bucket. This could be represented with LeftShift(Map(_.sort, Reduce(_ :: _, ???)) but backends tend to provide sort directly, so this avoids backends having to recognize the pattern. We could provide an algebra (Sort :+: QScript)#λ => QScript so that a backend without a native sort could eliminate this node.