Ludic numbers: Difference between revisions

m
→‎{{header|Haskell}}: concat . map -> concatMap, (and dropped a couple of redundant $)
m (Update output)
m (→‎{{header|Haskell}}: concat . map -> concatMap, (and dropped a couple of redundant $))
Line 1,467:
 
ludic :: [Integer]
ludic = 1 : unfoldr (\xs@(x:_) -> Just (x, dropEvery x xs)) [2 ..] where
where
dropEvery n = concat . mapconcatMap tail . unfoldr (Just . genericSplitAt n)
 
main :: IO ()
main = do
print $ take 25 $ ludic
(print $. length) $ takeWhile (<= 1000) $ ludic
print $ take 6 $ drop 1999 $ ludic
-- haven't done triplets task yet</lang>
{{out}}
<pre>
9,655

edits