
redblobgames.com
September 19, 2026
1 min read
50/100
Summary
In English, there is an “indefinite” article a that can go before a word. For example, a raccoon . But for some words, we use an. For example, an apple . When procedurally generating text, I want a function a_or_an("apple") that tells me which article to use. That seems like it’d be easy. We can check the first letter to see if it’s a vowel. But that would mean we output an unicorn , not a unicorn...