[Haskell-cafe] Re: Roman Numerals and Haskell Syntax abuse

George Russell ger at informatik.uni-bremen.de
Wed Jul 7 02:44:23 EDT 2004

Christian Maeder wrote (snipped)
 > btw, now 127:
 > roman=(!5);n!a|n<1=""|n>=t=s!!(a+1):(n-t)!a|c>=t=s!!(2*d):c!a|1>0=n!(a-1)where d=a`div`2;s="ivxlcdm";c=10^d+n;t=5^(d+1)*2^(a-d)

This is amazing!  When I posted my first attempt of 181 characters I thought it
might be minimal.

More information about the Haskell-Cafe mailing list