Runge-Kutta method: Difference between revisions
m
→{{header|Haskell}}
(→{{header|Haskell}}: Added an alternative draft, using a single scanl) |
|||
Line 897:
main :: IO ()
main =
(putStrLn . unlines) $
[ "y" ++ justifyRight 3 ' ' ('(' : show (round x)) ++ ") = "
, justifyLeft
])
▲ samples
where
justifyLeft n c s = take n (s ++ replicate n c)
|