1 ;;; Copyright (C) 2009 Brendan Ribera. All rights reserved.
2 ;;; Distributed under the MIT License; see the file LICENSE
3 ;;; at the root of this distribution.
6 (defn dist-squared [a b]
7 "Compute the K-dimensional distance between two points"
8 (reduce + (for [i (range (count a))]
14 (defn- node-value [n] (first n))
15 (defn- node-left [n] (first (rest n)))
16 (defn- node-right [n] (first (rest (rest n))))