Roman numeral by nobsun

f 'I'=1;f 'V'=5;f 'X'=10;f 'L'=50;f 'C'=100;f 'D'=500;f _=1000;l@main=getLine>>=print.snd.foldr(\a(b,s)->(a,s+signum(a-b+1)*a))(0,0).map f>>l

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

download

return to the top page