Here's the PR for my Haskell implementation: https://github.com/noinia/hgeometry/pull/120
Here's the documentation: https://noinia.github.io/hgeometry/doc/hgeometry-combinatori...