Pell numbers: Difference between revisions

m
(→‎{{header Haskell}}: Added a Haskell draft)
Line 430:
, ("a002315", a002315)
]
putStrLn "\nRational approximations to sqrt 2:"
mapM_ putStrLn $ take 10 $
(take 10 . tail) $ zipWith
zipWith
(\n d -> show n <> ('/':show d) <> " -> "
(\n d a000129->
<> show (fromIntegral n / fromIntegral d))
a001333 show n <>
('/' : show d) <> " -> " <> show (fromIntegral n / fromIntegral d))
a000129
a001333
a000129
putStrLn "\nPythagorean triples:"
print $ take 5 pythagoreanTriples</syntaxhighlight>
9,655

edits