Line circle intersection: Difference between revisions

m
→‎{{header|Haskell}}: One possible consolidation of the main – OP may prefer to revert.
m (→‎{{header|Haskell}}: Applied hlint and hindent (see https://github.com/tibbe/haskell-style-guide))
m (→‎{{header|Haskell}}: One possible consolidation of the main – OP may prefer to revert.)
Line 187:
</pre>
=={{header|Haskell}}==
<lang haskell>mainimport = doData.Tuple.Curry
 
mapM_ putStrLn $ task (-10, 11) (10, -9) ((3, -5), 3)
main :: IO ()
putStrLn ""
main =
mapM_ putStrLn $ task (-10, 11) (-11, 12) ((3, -5), 3)
mapM_ putStrLn ""$
concatMap
mapM_ putStrLn $ task (3, -2) (7, -2) ((3, -5), 3)
(("" :) . uncurryN task)
putStrLn ""
mapM_ putStrLn $ task[ (3(-10, -211), (710, -29), ((03, 0-5), 43))
mapM_ putStrLn $ task, ((-10, 11), (10-11, -912), ((3, -5), 3))
putStrLn ""
mapM_ putStrLn $ task, (0(3, -32), (07, 6-2), ((03, 0-5), 43))
mapM_ putStrLn $ task, ((3, -2), (7, -2), ((30, -50), 34))
putStrLn ""
mapM_ putStrLn $ task, (6(0, -3), (100, 76), ((40, 20), 54))
, ((6, 3), (10, 7), ((4, 2), 5))
putStrLn ""
mapM_ putStrLn $ task, ((7, 4), (11, 18), ((4, 2), 5))
]
 
task :: (Double, Double)
9,658

edits