Monoid instances by Hem

$_="instance (GaA => G(aB where\x0d
    I = (IC\x0d
    (a1DH(a2E = (a1Ha2F\x0d
";for$=(b..z){s/A/, G$=A/;s/B/,$=B/;s/C/,IC/;s/D/,$=1D/;s/E/,$=2E/;s/F/,$=1H$=2F/;s/G/Monoid /g;s/H/ `mappend` /g;s/I/mempty/g;print/c1/&&$/,s/[A-F]/)/gr}

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

download

return to the top page