Cantor set: Difference between revisions
Content deleted Content added
m →{{header|Phix}}: added syntax colouring the hard way |
m →Haskell :: Cantor Interval bars: Tidied |
||
Line 891:
Or, using strings for the model as well as the display:
<lang haskell>
cantor = (go =<<)
where
go x
let m = quot (length x) 3▼
|
where
▲ in bool [x] [block, replicate m ' ', block] ('█' == head x)
block = take m x
cantorLines :: Int -> String
|