RosettaCodeData/Task/K-means++-clustering/Racket/k-means++-clustering-4.rkt
Ingy döt Net 6f050a029e update
2013-06-05 21:47:54 +00:00

3 lines
131 B
Racket

(define (fixed-point f x0 #:same-test [same? equal?])
(let loop ([x x0] [fx (f x0)])
(if (same? x fx) fx (loop fx (f fx)))))