6 kyu

Dictionary sequence

66 of 113afonsomatos

Description:

Task

In this kata, your job is to return a lazy sequence consisting of strings containing the letters of the alphabet in both lowercase and uppercase.

Sequence

The sequence follows a recursive pattern:

  • first return each letter of the alphabet (lowercase before uppercase)
  • then return each letter of the alphabet appended to each element retrieved from a recursive call to the sequence
  • the sequence is infinite
a, b, c, ... y, z, A, B, C, ..., Y, Z, aa, ab, ac, ..., az, aA, ..., aZ, ba, bb, ..., bA, ..., bZ, ..., ca, ... cZ, ...
......, Za, Zb ..., ZZ, aaa, aab, ..., aaZ, aba, abb, ..., abZ, aca, ..., ..., ..., ZZZ, aaaa, aaab, ..

Good luck!

Algorithms

More By Author:

Check out these other kata created by afonsomatos

Stats:

CreatedAug 5, 2015
PublishedAug 5, 2015
Warriors Trained612
Total Skips30
Total Code Submissions428
Total Times Completed113
Haskell Completions66
JavaScript Completions51
Total Stars16
% of votes with a positive feedback rating74% of 35
Total "Very Satisfied" Votes23
Total "Somewhat Satisfied" Votes6
Total "Not Satisfied" Votes0
Ad
Contributors
  • afonsomatos Avatar
  • Unnamed Avatar
  • JohanWiltink Avatar
  • Voile Avatar
  • monadius Avatar
  • dfhwze Avatar
Ad