Numeric name expansion

Programming, for all ages and all languages.
Post Reply
Schol-R-LEA

Numeric name expansion

Post 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.
Post Reply