Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,21 @@
zipWithLazy :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWithLazy f ~(x : xs) ~(y : ys) =
f x y : zipWithLazy f xs ys
fuscs :: [Integer]
fuscs = 0 : s
where
s = 1 : concat (zipWithLazy f s (tail s))
f x y = [x, x + y]
widths :: [(Int, Integer)]
widths = map head $ scanl f (zip [0 ..] fuscs) [2 ..]
where
f fis w = dropWhile ((< w) . length . show . snd) fis
main :: IO ()
main = do
putStrLn "First 61 terms:"
print $ take 61 fuscs
putStrLn "\n(Index, Value):"
mapM_ print $ take 5 widths