It’s a beautiful construction. It reminds me a bit of the “canonical” quicksort in Haskell [1].
Neither of these implementations is going to be displacing absl::btree_map or std::sort any time soon, but I do feel we have a lot of “room at the bottom” for making simple and elegant code practical on real machines.
[1] https://stackoverflow.com/questions/7717691/why-is-the-minim...
Edit: replaced poorly formatted code with SO link.