Sha256: 20fba1b2cb3919c32d550700074f9dd08e1e4793c25a0509340db3dfe680f464
Contents?: true
Size: 318 Bytes
Versions: 396
Compression:
Stored size: 318 Bytes
Contents
(ns prime-factors) (defn- least-prime-divisor [number] (or (first (filter #(zero? (rem number %1)) (range 2 (inc (/ number 2))))) number)) (defn of [number] (if (< number 2) [] (let [divisor (least-prime-divisor number)] (into [divisor] (of (/ number divisor))))))
Version data entries
396 entries across 396 versions & 1 rubygems