KD-Tree-in-Pyret Basic Implementation of KD-Tree in Pyret Copy the code and run at https://code.pyret.org/editor