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

George Russell ger at informatik.uni-bremen.de
Tue Jul 6 04:38:30 EDT 2004


George Russell wrote (snipped):
> Yes, thanks to various contributors to this list, the shortest is now
> 148 characters!!
Now 145.
roman=(0#);a#n|n<1=""|n>=t!!a=s!!a:a#(n-t!!a)|n+t!!b>=t!!a=s!!b:a#(n+t!!b)|1>0=(a+1)#n where b=2*div a 2+2;s="mdclxvi";t=[1000,500,100,50,10,5,1]


More information about the Haskell-Cafe mailing list