Created
August 24, 2016 23:43
-
-
Save marcmartino/755ce7ce7e426cd475c111b4a0775fcd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findPrimeFact(num, accum = []) { | |
return 1; | |
} | |
function isDivisible(num) { | |
return (divisor) => num % divisor === 0; | |
} | |
function isPrime(num) { | |
return Array.from({length: Math.floor(num/4 - 1)}, | |
(x, i) => i * 2 + 3) | |
.filter(isDivisible(num)).length === 0; | |
} | |
//findPrimeFact(600851475143); | |
//not functional atm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment