RosettaCodeData/Task/Pythagoras-tree/Haskell/pythagoras-tree-5.hs

8 lines
264 B
Haskell

--import should go to the top of the code
import Graphics.EasyPlot
--change PNG by the desired format
main = plot (PNG "pith.png") $ map (mkLine . close) squares
where mkLine = Data2D [Style Lines, Color Black,Title ""] []
close lst = lst ++ [head lst]