Pointlessly make your way down the alphabet

Disclaimer: This challenge inspired by me spending the morning debugging recursive functions, which have been frying my brain a little.

Here's an example of recursion, from a letter, we keep going to the previous letter of the alphabet, printing out each one as we go, until we hit the letter a, then we print that and stop. We do this for each letter in a string and there's a pretty pattern at the end of it.

• Start with a string of characters
• The input string may only contain the lower-case letters a-z and the space character.
• For each letter, produce a line of text (terminal output or variable or whatever)
• Print out the letter
• Print out the previous letter (on the same line)
• Print out the previous letter (on the same line)
• Print out the previous letter (on the same line)
• ...
• If the letter is 'a', print it out and move to the next line.
• If it's a space, print out an empty line (or one just containing the space character.

The rules

• It's golf, try and make your code short.
• Any language you like.
• Please include a link to an online interpreter.
• The output should be human-readable (e.g. I can't work it out from a list of bytes.
• Follow the rules of the standard loopholes ¯\_(ツ)_/¯
• Recursion is not mandated by the rules, but it's probably necessary.

Test Cases

Input: 'abcdefghijklmnopqrstuvwxyz' Output:

a
ba
cba
dcba
edcba
fedcba
gfedcba
hgfedcba
ihgfedcba
jihgfedcba
kjihgfedcba
lkjihgfedcba
mlkjihgfedcba
nmlkjihgfedcba
onmlkjihgfedcba
ponmlkjihgfedcba
qponmlkjihgfedcba
rqponmlkjihgfedcba
srqponmlkjihgfedcba
tsrqponmlkjihgfedcba
utsrqponmlkjihgfedcba
vutsrqponmlkjihgfedcba
wvutsrqponmlkjihgfedcba
xwvutsrqponmlkjihgfedcba
yxwvutsrqponmlkjihgfedcba
zyxwvutsrqponmlkjihgfedcba


Input: 'zyxwvutsrqponmlkjihgfedcba'

zyxwvutsrqponmlkjihgfedcba
yxwvutsrqponmlkjihgfedcba
xwvutsrqponmlkjihgfedcba
wvutsrqponmlkjihgfedcba
vutsrqponmlkjihgfedcba
utsrqponmlkjihgfedcba
tsrqponmlkjihgfedcba
srqponmlkjihgfedcba
rqponmlkjihgfedcba
qponmlkjihgfedcba
ponmlkjihgfedcba
onmlkjihgfedcba
nmlkjihgfedcba
mlkjihgfedcba
lkjihgfedcba
kjihgfedcba
jihgfedcba
ihgfedcba
hgfedcba
gfedcba
fedcba
edcba
dcba
cba
ba
a


Input: 'hello world' Output:

hgfedcba
edcba
lkjihgfedcba
lkjihgfedcba
onmlkjihgfedcba

wvutsrqponmlkjihgfedcba
onmlkjihgfedcba
rqponmlkjihgfedcba
lkjihgfedcba
dcba

• May we output a list of strings instead of a single string with linefeeds? – Arnauld Nov 21 at 13:10
• I don't think a single answer uses recursion – Jo King Nov 22 at 1:39
• “Human readable” prohibits most of the languages popular here! – WGroleau Nov 22 at 2:50
• @WGroleau Ah, I think I've spotted what's gone wrong here. I didn't require that the code should be human-readable, only the result. – AJFaraday Nov 22 at 9:13
• Recursion is never necessary. At the very worst, you can just use stack data structure to have your own "recursion" in a flat loop, ending when the stack is empty. – Tomáš Zato - Reinstate Monica Nov 22 at 11:41

Dyalog APL Extended, 4 bytes

⌽∘⍳¨


Try it online!

 ∘    the function composition of
⍳     iota - 'a'..input for alphabet chars, empty array for space
⌽       and after, reverse
¨  applied to each

• We have peaked as a species. – TRose Nov 21 at 22:16
• Answers in obscure languages usually make the language name a link to documentation. Could you add that? – Justin Lardinois Nov 22 at 1:01
• @JustinLardinois I don't think APL is exactly an obscure language, but here's the link: APL - Wikipedia. – Trebor Nov 22 at 11:51
• @JustinLardinois Added (I did manually remove the link from the TIO format when renaming the title...) The only used difference from regular Dyalog APL is the (surprisingly useful) extended ⍳. – dzaima Nov 22 at 11:58
• @Trebor APL isn't obscure, but this flavor of it is. It's not even mentioned in that Wikipedia article. – Justin Lardinois Nov 22 at 22:17

Haskell, 26 24 bytes

-2 bytes thanks to FrownyFrog.

map(\i->reverse['a'..i])


Try it online!

Pointless (or pointfree :P) for you.

• 24 with map(\i->reverse['a'..i]) – FrownyFrog Nov 21 at 23:04
• Those darn enumFromThenTo functions and their ungolfiness. – totallyhuman Nov 21 at 23:31
• I want to say map(\i->[i,pred i..'a']) but it's the same size. – Joseph Sible-Reinstate Monica Nov 22 at 2:24
• I want to say map$\i->reverse['a'..i] but it's the same size, too. – Andrew Ray Nov 26 at 18:03 C (gcc), 58 56 bytes Saved 2 bytes thanks to @KritixiLithos c;f(char*s){while(c=c&&putchar(c>96?c:10)^10?c-1:*s++);}  Try it online! • I believe the putchar call can be used in the while condition to save a byte. – Kritixi Lithos Nov 22 at 10:24 • @KritixiLithos Thanks! This saves 2 bytes, although I suspect there's a way to save more. – Arnauld Nov 22 at 10:52 • You can also use 0 instead of 10 and get spaces instead of newlines between the outputs. (only tested on TIO YMMV) – John Hamilton Nov 22 at 10:56 • @JohnHamilton The delimiter will then be NULL-bytes (\0). Although TIO shows them as spaces, most compilers will not show any output for NULL-bytes instead. 9 instead of 10 can be used with tab-delimiters though, for the same -2. – Kevin Cruijssen Nov 22 at 11:03 • @KevinCruijssen Yeah, you're right. It could create problems with the null character. Tab delimiter works better. – John Hamilton Nov 22 at 11:05 PowerShell, 37 28 bytes -9 bytes thanks to mazzy $args|%{-join($_..'a'-le$_)}


Try it online!

Takes input via splatting and uses char ranges introduced in PS v6. The range is then filtered out by only taking elements that are less than the current character. This in turns means decreasing ranges are unaffected (e.g. 'z'..'a') whereas increasing ranges (e.g. ' '..'a') will filter out everything except the space.

• you can save some bytes Try it online! – mazzy Nov 21 at 15:17
• @mazzy I will never in my life remember to filter a range. Thanks – Veskah Nov 21 at 15:26

Malbolge20 and Malbolge Unshackled polyglot, around 2MB, 107KB compressed.

Alright. I spent around 30 minutes on this answer (current record). It's really optimal answer. Albeit not so fast and not so memory-exhausting (only ~512 megabytes), it's still a Malbolge answer so please keep that noted.

The program is packed using 7zip and PPMd compression algorithm. You can download it here.

Interpreter that works the best with the program.

#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

const char* translation = "5z]&gqtyfr$(we4{WP)H-Zn,[%\\3dL+Q;>U!pJS72Fh" "OA1CB6v^=I_0/8|jsb9m<.TVacuY*MK'X~xDl}REokN:#?G\"i@"; typedef struct Word { unsigned int area; unsigned int high; unsigned int low; } Word; void word2string(Word w, char* s, int min_length) { if (!s) return; if (min_length < 1) min_length = 1; if (min_length > 20) min_length = 20; s[0] = (w.area%3) + '0'; s[1] = 't'; char tmp[20]; int i; for (i=0;i<10;i++) { tmp[19-i] = (w.low % 3) + '0'; w.low /= 3; } for (i=0;i<10;i++) { tmp[9-i] = (w.high % 3) + '0'; w.high /= 3; } i = 0; while (tmp[i] == s[0] && i < 20 - min_length) i++; int j = 2; while (i < 20) { s[j] = tmp[i]; i++; j++; } s[j] = 0; } unsigned int crazy_low(unsigned int a, unsigned int d){ unsigned int crz[] = {1,0,0,1,0,2,2,2,1}; int position = 0; unsigned int output = 0; while (position < 10){ unsigned int i = a%3; unsigned int j = d%3; unsigned int out = crz[i+3*j]; unsigned int multiple = 1; int k; for (k=0;k<position;k++) multiple *= 3; output += multiple*out; a /= 3; d /= 3; position++; } return output; } Word zero() { Word result = {0, 0, 0}; return result; } Word increment(Word d) { d.low++; if (d.low >= 59049) { d.low = 0; d.high++; if (d.high >= 59049) { fprintf(stderr,"error: overflow\n"); exit(1); } } return d; } Word decrement(Word d) { if (d.low == 0) { d.low = 59048; d.high--; }else{ d.low--; } return d; } Word crazy(Word a, Word d){ Word output; unsigned int crz[] = {1,0,0,1,0,2,2,2,1}; output.area = crz[a.area+3*d.area]; output.high = crazy_low(a.high, d.high); output.low = crazy_low(a.low, d.low); return output; } Word rotate_r(Word d){ unsigned int carry_h = d.high%3; unsigned int carry_l = d.low%3; d.high = 19683 * carry_l + d.high / 3; d.low = 19683 * carry_h + d.low / 3; return d; } // last_initialized: if set, use to fill newly generated memory with preinitial values... Word* ptr_to(Word** mem[], Word d, unsigned int last_initialized) { if ((mem[d.area])[d.high]) { return &(((mem[d.area])[d.high])[d.low]); } (mem[d.area])[d.high] = (Word*)malloc(59049 * sizeof(Word)); if (!(mem[d.area])[d.high]) { fprintf(stderr,"error: out of memory.\n"); exit(1); } if (last_initialized) { Word repitition[6]; repitition[(last_initialized-1) % 6] = ((mem[0])[(last_initialized-1) / 59049]) [(last_initialized-1) % 59049]; repitition[(last_initialized) % 6] = ((mem[0])[last_initialized / 59049]) [last_initialized % 59049]; unsigned int i; for (i=0;i<6;i++) { repitition[(last_initialized+1+i) % 6] = crazy(repitition[(last_initialized+i) % 6], repitition[(last_initialized-1+i) % 6]); } unsigned int offset = (59049*d.high) % 6; i = 0; while (1){ ((mem[d.area])[d.high])[i] = repitition[(i+offset)%6]; if (i == 59048) { break; } i++; } } return &(((mem[d.area])[d.high])[d.low]); } unsigned int get_instruction(Word** mem[], Word c, unsigned int last_initialized, int ignore_invalid) { Word* instr = ptr_to(mem, c, last_initialized); unsigned int instruction = instr->low; instruction = (instruction+c.low + 59049 * c.high + (c.area==1?52:(c.area==2?10:0)))%94; return instruction; } int main(int argc, char* argv[]) { Word** memory[3]; int i,j; for (i=0; i<3; i++) { memory[i] = (Word**)malloc(59049 * sizeof(Word*)); if (!memory) { fprintf(stderr,"not enough memory.\n"); return 1; } for (j=0; j<59049; j++) { (memory[i])[j] = 0; } } Word a, c, d; unsigned int result; FILE* file; if (argc < 2) { // read program code from STDIN file = stdin; }else{ file = fopen(argv[1],"rb"); } if (file == NULL) { fprintf(stderr, "File not found: %s\n",argv[1]); return 1; } a = zero(); c = zero(); d = zero(); result = 0; while (!feof(file)){ unsigned int instr; Word* cell = ptr_to(memory, d, 0); (*cell) = zero(); result = fread(&cell->low,1,1,file); if (result > 1) return 1; if (result == 0 || cell->low == 0x1a || cell->low == 0x04) break; instr = (cell->low + d.low + 59049*d.high)%94; if (cell->low == ' ' || cell->low == '\t' || cell->low == '\r' || cell->low == '\n'); else if (cell->low >= 33 && cell->low < 127 && (instr == 4 || instr == 5 || instr == 23 || instr == 39 || instr == 40 || instr == 62 || instr == 68 || instr == 81)) { d = increment(d); } } if (file != stdin) { fclose(file); } unsigned int last_initialized = 0; while (1){ *ptr_to(memory, d, 0) = crazy(*ptr_to(memory, decrement(d), 0), *ptr_to(memory, decrement(decrement(d)), 0)); last_initialized = d.low + 59049*d.high; if (d.low == 59048) { break; } d = increment(d); } d = zero(); unsigned int step = 0; while (1) { unsigned int instruction = get_instruction(memory, c, last_initialized, 0); step++; switch (instruction){ case 4: c = *ptr_to(memory,d,last_initialized); break; case 5: if (!a.area) { printf("%c",(char)(a.low + 59049*a.high)); }else if (a.area == 2 && a.low == 59047 && a.high == 59048) { printf("\n"); } break; case 23: a = zero(); a.low = getchar(); if (a.low == EOF) { a.low = 59048; a.high = 59048; a.area = 2; }else if (a.low == '\n'){ a.low = 59047; a.high = 59048; a.area = 2; } break; case 39: a = (*ptr_to(memory,d,last_initialized) = rotate_r(*ptr_to(memory,d,last_initialized))); break; case 40: d = *ptr_to(memory,d,last_initialized); break; case 62: a = (*ptr_to(memory,d,last_initialized) = crazy(a, *ptr_to(memory,d,last_initialized))); break; case 81: return 0; case 68: default: break; } Word* mem_c = ptr_to(memory, c, last_initialized); mem_c->low = translation[mem_c->low - 33]; c = increment(c); d = increment(d); } return 0; }  It works! JavaScript (Node.js), 56 bytes Takes input as a list of characters. Returns a list of strings. s=>s.map(g=c=>(c|=(B=Buffer)(c)[0])>96?B([c--])+g(c):'')  Try it online! Commented s => // s[] = input characters s.map(g = c => // for each character c in s[], using the recursive function g: ( c |= // update c: (B = Buffer) // on the first iteration, c is a character and Buffer(c)[0] (c)[0] // returns its ASCII code; on later iterations, c is an // integer and Buffer(c) creates a buffer filled with NUL bytes ) > 96 ? // if c is greater than 96: B([c--]) // append the character of ASCII code c and decrement c + g(c) // append the result of a recursive call : // else: '' // stop recursion ) // end of map()  R, 6362 61 bytes -16 bytes thanks to Giuseppe -7 more bytes, again, thanks to Giuseppe -1 byte adding a line break in place of \n -1 byte thanks to Robin Ryder for(l in utf8ToInt(scan(,""))-96)cat(letters[l:0],' ',sep="")  Try it online! R, 86 bytes (my original answer) x=utf8ToInt(scan(,''));s=sapply;cat(gsub(" .+"," ",s(s(x,:,97),intToUtf8)),sep="\n")  Ungolfed: x=utf8ToInt(scan(,'')) #Takes input, converts to ASCII s=sapply; #Alias sapply function to save a byte s(x,:,97) #Create vector from 97 to respective ASCII value s( ,intToUtf8) #Convert to character gsub(" .+"," ", ) #Removes everything after space cat( ,sep="\n") #Outputs to console  Try it online! Could likely be golfed. NOTE: It does not use recursion. I do not know whether that would be shorter or not. I'll experiment later. • 80 bytes – Giuseppe Nov 21 at 19:37 • Just when I felt confident I had found a solid answer, @Giuseppe comes back again with something better! As expected... – Sumner18 Nov 21 at 19:52 • ooh, or 63 bytes -- I'm just very excited to get back into golfing!!!! – Giuseppe Nov 21 at 20:36 • Aha, I found 1 more byte! I don't feel as useless anymore. Haha – Sumner18 Nov 21 at 20:44 • 61 bytes – Robin Ryder Nov 22 at 13:08 C (gcc), 56, 53 bytes c;f(char*s){for(c=*s;c;)putchar(c<97?c=*++s,10:c--);}  Try it online! Now down to 53 bytes! It can probably be golfed more though... • You can put your putchar call as the second statement of your for loop, since putchar returns the value of the character just written i.e. c. Saves you a grand total of one byte. – Orion Nov 23 at 17:32 • Thanks for the insight. I don't think it works though, since c=*++s,10 actually returns 10. Please correct me if I'm wrong though! – dingledooper Nov 23 at 20:00 Perl 6, 24 bytes *.comb>>.&{[R~] 'a'..$_}


Try it online!

Returns a list of strings.

Explanation

*.comb  # Split into characters
>>.&{            }  # Map to
'a'..$_ # Range 'a' to current character [R~] # Reverse concat  Python 3, 65 bytes lambda s:print([''.join(map(chr,range(ord(c),96,-1)))for c in s])  Outputs a list of strings as clarified in @Arnauld's comment. If we could assume that a string s existed with the content it would be 56 bytes. Try it online! • I didn't see this before I posted my very similar edit for a second method in my answer. You beat me by managing to lose the second map and keeping it looking nice :) +1 – ElPedro Nov 21 at 17:27 • btw, you can get it down to 58 as you don't need the print inside the lambda. It's allowed to just return the value then print it from outside. – ElPedro Nov 21 at 17:35 Sed (with -r switch), 656160 59 characters s/./&zyxwvutsrqponmlkjihgfedcba \n/g s/(.).*\1/\1/gm s/ //g  Thanks to: • Kritixi Lithos for finding an unnecessary capturing (-3 characters) • Kritixi Lithos for anchoring to line start not anchoring instead of word start (-1 2 characters) • Kritixi Lithos for combining the 2 solutions advantages (2 characters) Sample run: bash-5.0$ sed -r 's/./&zyxwvutsrqponmlkjihgfedcba \n/g;s/(.).*\1/\1/gm;s/ //g' <<< 'cg cc'
cba
gfedcba

cba
cba


Try it online!

Sed (with -r switch), 53 52 characters

s/./&zyxwvutsrqponmlkjihgfedcba \n/g
s/(.).*\1/\1/gm


In case trailing spaces are acceptable.

Try it online!

• The capturing group in the first substitution can be removed, and the second substitution can be shortened by a bit. Additionally you can find another way to treat spaces (note the rules allow printing a space instead of a blank line when the char is a space) to golf it some more. – Kritixi Lithos Nov 21 at 18:10
• Thank you, @KritixiLithos. I was so happy I got rid of initial 77 character version with looping, that I forgot to recheck some details. – manatwork Nov 21 at 18:47
• One more byte can be removed from the second substitution (60b), and you can use the approach by the 53-byte solution to get a valid solution shorter than the now 60 byte solution. – Kritixi Lithos Nov 22 at 6:55
• Thank you, @KritixiLithos. No I idea why I kept anchoring that expression. – manatwork Nov 22 at 18:37
• Maybe you missed the second part of my comment, you can have s/ // at the end of the 52b solution to get a valid 58b solution – Kritixi Lithos Nov 23 at 16:09

K (oK), 17 14 bytes

-3 bytes thanks to streetster

-3 bytes thanks to ngn

c$96-!:'0&96-  Try it online! • You dont need to wrap it in a lambda; f:{c$97+|!0|x-96}' – streetster Nov 23 at 19:48
• @streetster Yes, of course! Thank you! – Galen Ivanov Nov 23 at 19:54
• !x works for negative ints too, giving us a reverse for free: {c$96-!0&96-x}' – ngn Nov 24 at 15:22 • without the lambda: c$96-!:'0&96- – ngn Nov 24 at 15:27
• it depends on the version of k. afaik in k5 !-n was "permutations", in k6 (and ngn/k and oK) !-n was -n-!n, and in other versions it's an error. – ngn Nov 24 at 18:45

Jelly,  8  7 bytes

A monadic link returning a list of strings.

ḲOr97ỌK


Try it online!

ḲOr97ỌK   - a monadic link taking a string, e.g. "ab c"
Ḳ         - split at spaces                 --> ["ab", "c"]
O        - get ASCII codes                 --> [[97, 98], [99]]
r97     - build descending range to 97    --> [[[97], [98, 97]], [[99, 98, 97]]]
Ọ    - turn back into ASCII            --> [["a", "ba"], ["cba"]]
K   - join with spaces                --> ["a", "ba", " ", "cba"]

• You asked if we may output a list of lines - since we may you can safely remove the trailing Y (add ÇY to the footer to show it run as a full program) - I posted a different 7 too :) – Jonathan Allan Nov 25 at 18:33

PostgreSQL, 119 characters

\prompt s
select(select string_agg(chr(s),'')from generate_series(ascii(c),97,-1)s)from regexp_split_to_table(:'s','')c


(Those verbose function names are killing me…)

Sample run:

bash-5.0$psql -Atf pointlessly-recurse.sql <<< 'hello world' hgfedcba edcba lkjihgfedcba lkjihgfedcba onmlkjihgfedcba wvutsrqponmlkjihgfedcba onmlkjihgfedcba rqponmlkjihgfedcba lkjihgfedcba dcba  V (vim), 15 bytes \Óçá/A¬za Íˆ…±  Try it online! Hexdump: 00000000: 5cd3 e7e1 2f41 ac7a 610d cd88 8185 b1 \.../A.za......  Fun fact: Recursion is the only form of looping that V has, yet this submission doesn't use any. Befunge-98 (PyFunge), 18 bytes #@~#;:'j;:,1-;a,  Try it online! PHP, 88 bytes <?php for(;$i<strlen($s=$argv[1]);){for($j=ord($s[$i++]);$j>96;)echo chr($j--);echo" ";}  Try it online! Thanks to Shaggy for -21 bytes! :) • Welcome to PPCG. A few quick savings for you: tio.run/… – Shaggy Nov 22 at 12:28 • Missed a few, sorry: tio.run/##K8go@P/fxr4go4ArLb9Iw1olyza/… – Shaggy Nov 22 at 22:45 • Also, if you can figure out how to get shorttags working on TIO, you can save another 4. I can never remember! – Shaggy Nov 22 at 22:45 Jelly, 7 bytes Øa>Ðḟ)U  A monadic link accepting a list of characters which yields a list of lists of characters. Try it online! (adds newlines, since as a full program Jelly will print a smashed version of the lists) How? Øa>Ðḟ)U - Link: list of characters, S ) - for each (character, c, in S): Øa - yield the lowercase alphabet ['a', 'b', ..., 'z'] Ðḟ - filter discard those for which: > - greater than (c)? U - reverse each resulting list (each line)  05AB1E, 1412 5 bytes AAηí‡  -2 bytes by outputting as a list of strings. -7 bytes (byte-count more than halved) thanks to @Grimy. Input as a list of characters. Or alternatively: AÂ.s‡  Explanation: A # Push the lowercase alphabet Aη # Push a list of prefixes of the lowercase alphabet í # Reverse each prefix ‡ # Transliterate all characters of the alphabet to these reversed prefixes in # the (implicit) input-list # (after which the resulting string-list is output implicitly) A # Push the lowercase alphabet Â # Bifurcate it; short for Duplicate & Reverse copy .s # Get the prefixes of that reversed alphabet ‡ # Transliterate all characters of the alphabet to these reversed prefixes in # the (implicit) input-list # (after which the resulting string-list is output implicitly)  • k followed by è is just the ‡ built-in. This yields a 6: εAAηí‡. And if we take input as a list of characters, we can omit the ε for a 5, though that might be pushing it, since output has to be a list of lines, not characters. – Grimmy Nov 21 at 19:54 • @Grimmy "k followed by è is just the ‡ built-in." I'm such an idiot.. And taking a string input as a list of characters is allowed by default, since in most languages a string simply is a CharacterSequence. So thanks for more than halving my byte-count.. :D – Kevin Cruijssen Nov 21 at 22:24 • Alternate 5-byter: AÂ.s‡ – Grimmy Nov 29 at 13:09 Japt-mR, 6 bytes Takes input as an array of characters. ;CÔk>U  Try it Ruby, 41 characters ->s{s.chars{|c|puts [*?a..c].reverse*''}}  or ->s{s.gsub(/./){[*?a..$&].reverse*''+$/}}  No recursion here. Sample run: irb(main):001:0> ->s{s.chars{|c|puts [*?a..c].reverse*''}}['cgcc'] cba gfedcba cba cba  Try it online! GolfScript, 27 18 bytes [{),97>-1%10}/]''+  Try it online! Explanation:  { }/ Iterate over (implicit) input ), Create array [0 1 2 ... n] 97> Remove items less than 97 -1% Reverse order 10 Push 10 [ ] Place in array ''+ Convert ascii values to string  SNOBOL4 (CSNOBOL4), 94 bytes  I =INPUT S I LEN(1) . X REM . I :F(END) Y = &LCASE ARB . Y X OUTPUT =X REVERSE(Y) :(S) END  Try it online! Julia 1.0, 36 29 bytes f(s)=[join(i:-1:'a') for i=s]  Try it online! Note: Outputs as an array of strings. To display in a nice output format, use, for example, println.(f("hello world")) • 26 bytes by using an anonymous function and broadcast over a generator: s->join.(i:-1:'a' for i=s) – TimD Nov 22 at 7:21 Poetic, 482 bytes transmit a letter or two,a-z enter in letters from a-z+space i did a print,i say a letter&go down i am moving in a cycle i get to letter a,and maybe to space i then create lines as i output the ten,a ASCII N/L char i figure x>y,and i do admire a way i check it if indeed x>y,then i rerun;if not,i finish it to output N/L char i write it out&i follow it up until no char i input is here o,et cetera as i run i do admit,i do run relatively longish o,i say,i do loads of BS deriving it  Try it online! Not sure why no one's posted a pure brainfuck solution yet, the brainfuck program I made this poem from amounts to only 108 bytes. Brachylog, 13 bytes ẹ{;Ẓ↔⟨a₁h⟩|}ᵐ  Try it online! This feels... bad. ẹ{ }ᵐ For each element of the input, a₁ output the suffix of Ẓ the lowercase alphabet reversed ; ↔⟨ h⟩ for which the first element is the input, | or the input if there is no such suffix.  A 9-byte generator is possible if spaces are completely ignored: ∋;Ẓ↔⟨a₁h⟩. Accounting for spaces brings it up to the same byte count: Brachylog, 13 bytes ∋{;Ẓ↔⟨a₁h⟩!|}  Try it online! Scala, 53 bytes def f(s:String)=s.map(c=>('a'to c).reverse.mkString)  Try it online! Note: return the list of strings. To do the actual output, use .map(println) or so • Save 10 bytes by using lambdas: (_: String).map('a'.to(_).reverse.mkString)  Try it online! – Soren Nov 23 at 19:12 IBM/Lotus Notes Formula, 116 bytes a:="zyxwvutsrqponmlkjihgfedcba";p:="";@For(x:=1;x<=@Length(i);x:=x+1;c:=@Right(@Left(i;x);1);p:=p:(c+@Right(a;c)));p  I have never found a practical use for @For except when golfing. Bash, 7363 57 bytes while read -n1 a;do [ -$a]&&echo||eval echo {$a..a};done  Try it online! -6 bytes thanks to Kritixi Lithos • You can skip out on fold with read -n1 a. Also apparently [ =$a] can replace [ -z $a] – Kritixi Lithos Nov 22 at 10:26 • Beautiful. Tyvm. – Jonah Nov 22 at 12:28 Retina, 38 bytes L$.
27*$& +T l_al(?<=(.))\1+ aa+ a  Try it online! Explanation: L$.
27*\$&


List each character 27 times each on its own line.

+T l_al(?<=(.))\1+


Count all the characters back down to a, except the first of each run, and also delete trailing spaces.

aa+
a


Remove trailing a`s.