Cantor set: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: added syntax colouring the hard way) |
m (→Haskell :: Cantor Interval bars: Tidied) |
||
Line 891: | Line 891: | ||
Or, using strings for the model as well as the display: |
Or, using strings for the model as well as the display: |
||
<lang haskell> |
<lang haskell>cantor :: [String] -> [String] |
||
cantor :: [String] -> [String] |
|||
cantor = (go =<<) |
cantor = (go =<<) |
||
where |
where |
||
go x |
go x |
||
⚫ | |||
⚫ | |||
| otherwise = [x] |
|||
where |
|||
⚫ | |||
⚫ | |||
block = take m x |
|||
cantorLines :: Int -> String |
cantorLines :: Int -> String |