pairs, memoize
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
(defun differences [:kiss.List<Int> ratings]
|
||||
(for idx (range (- ratings.length 1))
|
||||
(- (nth ratings (+ idx 1)) (nth ratings idx))))
|
||||
(for pair (pairs ratings) (- 0 (apply - pair))))
|
||||
|
||||
(defun distribution [:kiss.List<Int> numbers]
|
||||
(let [:Map<Int,Int> dist (new Map)]
|
||||
|
Reference in New Issue
Block a user