Anonymous user
Sequence of primorial primes: Difference between revisions
Updated Haskell code to start at 1 (by dropping one element from the generated sequence)
(→{{header|Haskell}}: Incomplete due to start clarification.) |
(Updated Haskell code to start at 1 (by dropping one element from the generated sequence)) |
||
Line 18:
=={{header|Haskell}}==
<lang Haskell>
import Data.List (scanl1, findIndices, nub)
Line 40 ⟶ 39:
sequenceOfPrimorialPrimes :: [Int]
sequenceOfPrimorialPrimes = tail $ nub $ map (`div` 2) $ findIndices (==True) bools
where bools = map isPrime primorialsPlusMinusOne
Line 50 ⟶ 49:
<pre>
1
2
Line 60 ⟶ 58:
13
24
66
</pre>
|