Cantor set: Difference between revisions
Content added Content deleted
(Added XPL0 example.) |
|||
Line 1,598: | Line 1,598: | ||
cantor :: (Rational, Rational) -> [[(Rational, Rational)]] |
cantor :: (Rational, Rational) -> [[(Rational, Rational)]] |
||
cantor = iterate ( |
cantor = iterate (go =<<) . pure |
||
where |
where |
||
go (x, y) = [(x, x + r), (y - r, y)] |
go (x, y) = [(x, x + r), (y - r, y)] |