Wide Periodic Table by notogawa

import Text.Printf
main=mapM putStrLn$f 1 c"He\30H!LiBe\24BCNOFNe!NaMg\24AlSiPSClAr!KCa\14ScTiVCrMnFeCoNiCuZnGaGeAsSeBrKr!RbSr\14YZrNbMoTcRuRhPdAgCdInSnSbTeIXe!CsBaLaCePrNdPmSmEuGdTbDyHoErTmYbLuHfTaWReOsIrPtAuHgTlPbBiPoAtRn!FrRaAcThPaUNpPu amCmBkCfEsFmMdNoLrRfDbSgBhHsMtDsRgCnUutUuqUupUuhUusUuo"
f n s(a:x)|a<' '=f n(map(++(['\1'..a]>>"    "))s)x|a=='!'=s++f n c x|0<1=f(n+1)(zipWith((++).init)s$"+---+":map(printf"|%3s|")[show n,a:max" "b])y where(b,y)=span('_'<)x
f n(a:x)_=a:x++[a]
c=cycle[" "]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page