Page 1 of 1

Numeric name expansion

Posted: Wed Sep 15, 2004 12:50 pm
by Schol-R-LEA
In a recent posting on the User Friendly message board, a poster flamed about the stupid manner in which his a professor teaching a class in Perl demonstrated a common homework assignment: converting an integer to it's English-language name.

To make a long story short, I got curious and decided to try writing a similar program in Scheme, but designed it so that it will expand out to the quintidecatillions. Hoewever, the best I came up with was neither short nor simple, and in fact was a sprawling mess. Now, while I like Scheme quite a bit, I am not very experienced in it; I'm sure that there is a better way to write this (in Scheme, that is), but I can't seem to figure it out. Any suggestions?

No pressure, thought; this is purely out of personal curiosity.