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

4 lines
153 B
Haskell
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
squares = concat $ take 10 $ iterateM mkBranches start
where start = [(0,100),(100,100),(100,0),(0,0)]
iterateM f x = iterate (>>= f) (pure x)