@[irreducible]
Kernel-reducible stable merge.
Equations
- Hex.List.merge le [] ys = ys
- Hex.List.merge le xs [] = xs
- Hex.List.merge le (x :: xs_2) (y :: ys_2) = if le x y = true then x :: Hex.List.merge le xs_2 (y :: ys_2) else y :: Hex.List.merge le (x :: xs_2) ys_2
Instances For
Stable merge sort with structural recursion and exposed implementation helpers. The fuel is the input length, which bounds the depth of its halving recursion.
Equations
- Hex.List.sort xs le = Hex.List.sort.go le xs.length xs
Instances For
@[csimp]
Compiled code keeps core's efficient merge-sort implementation.