Skip to content

da-cali/numberToWords

Repository files navigation

numberToWords

A simple tool for generating names of numbers. It is based on the Conway-Wechsler naming system, and it uses Haskell infinite lists to generate names of powers of 10 beyond 10^3002; so in theory it can generate the name of any integer in the real line.

Examples:

nameOf 0
"zero"
nameOf (-99)
"minus ninety-nine"
nameOf 12345
"twelve thousand, three hundred forty-five"
nameOf (10^3003)
"one millinillion"
nameOf (10^59052)
"one novendecillitresoctogintasescentillion"

Usage:

Since it only requires the standard prelude, you can just copy the source code and load it in GHCi, or

Run the app:

  1. Install stack.

  2. Clone repository:

    git clone https://github.com/da-cali/numberToWords
    
  3. Open folder:

    cd numberToWords
    
  4. Build project:

    stack build
    
  5. Run:

    stack runhaskell app/Main.hs
    

Releases

No releases published

Packages

No packages published