Origin
Synced from Notion: LAMBDA: ALPHABET
Problem
The library has no stored letter constants. Letter-based puzzles — index↔letter, Scrabble/cipher scoring, vowel/consonant counts, "Nth letter" — need the alphabet, vowels, or consonants instantly. Deriving consonants (alphabet minus vowels) from scratch under a 30-minute clock wastes time. The competitor stored six bare constants (_alphabet_l/u, _vowels_l/u, _consonants_l/u); we prefer one parametrised function for discoverability.
Proposed
=ALPHABET([case], [subset])
- case — "U" uppercase (default) / "L" lowercase
- subset — "ALL" (default) / "VOWELS" / "CONSONANTS"
Returns a spilled array of the requested letters (26 / 5 / 21).
Examples
=ALPHABET() → A, B, C, … , Z
=ALPHABET("L", "VOWELS") → a, e, i, o, u
=XMATCH("M", ALPHABET()) → 13 (letter → index)
Notes
- One discoverable name instead of six bare constants (fits the "fewer public names" preference).
alphabet itself is trivially CHAR(SEQUENCE(26,,65)); vowels / consonants are the parts that actually earn storing.
- Pairs with existing
EXPLODE / CHARQ for letter-indexing work.
Origin
Synced from Notion: LAMBDA: ALPHABET
Problem
The library has no stored letter constants. Letter-based puzzles — index↔letter, Scrabble/cipher scoring, vowel/consonant counts, "Nth letter" — need the alphabet, vowels, or consonants instantly. Deriving consonants (alphabet minus vowels) from scratch under a 30-minute clock wastes time. The competitor stored six bare constants (
_alphabet_l/u,_vowels_l/u,_consonants_l/u); we prefer one parametrised function for discoverability.Proposed
Returns a spilled array of the requested letters (26 / 5 / 21).
Examples
=ALPHABET()→ A, B, C, … , Z=ALPHABET("L", "VOWELS")→ a, e, i, o, u=XMATCH("M", ALPHABET())→ 13 (letter → index)Notes
alphabetitself is triviallyCHAR(SEQUENCE(26,,65)); vowels / consonants are the parts that actually earn storing.EXPLODE/CHARQfor letter-indexing work.