A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
7
Task/Mandelbrot-set/Haskell/mandelbrot-set.hs
Normal file
7
Task/Mandelbrot-set/Haskell/mandelbrot-set.hs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import Data.Complex
|
||||
|
||||
mandelbrot a = iterate (\z -> z^2 + a) 0 !! 50
|
||||
|
||||
main = mapM_ putStrLn [[if magnitude (mandelbrot (x :+ y)) < 2 then '*' else ' '
|
||||
| x <- [-2, -1.9685 .. 0.5]]
|
||||
| y <- [1, 0.95 .. -1]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue