[Question]
  [
# Super permutations
Input: A string  
The program should loop through all lengths of the input (decrementing one each time), generate all combinations with replacement of the string, then make permutations out of the generated combinations, and display all of the strings.
They can be separated with anything (doesn't need to be a comma)
Example for the string 'abc':
```
a, b, c, aa, ab, ac, ba, bb, bc, ca, cb, cc
aaa, aab, aac, aba, abb, abc, aca, acb, acc
baa, bab, bac, bba, bbb, bbc, bca, bcb, bcc
caa, cab, cac, cba, cbb, cbc, cca, ccb, ccc
```
The values don't necessarily have to be sorted.  
Avoid any standard loop holes.
  
[Answer]
# Scratch 3.0, 65 blocks / ~~637~~ 632 bytes
[![Part 1](https://i.stack.imgur.com/Z2T10.png)](https://i.stack.imgur.com/Z2T10.png)
[![Part 2](https://i.stack.imgur.com/dBCT2.png)](https://i.stack.imgur.com/dBCT2.png)
[![Part 3](https://i.stack.imgur.com/YqmpC.png)](https://i.stack.imgur.com/YqmpC.png)
[![Part 4](https://i.stack.imgur.com/I5qGC.png)](https://i.stack.imgur.com/I5qGC.png)
Look at y'all, having fun with your fancy shmancy permutation functions/map tools. Well, not I! ***No***, not I! When using Scratch, one has to do things themselves! You won't find any built-ins around these parts! *I'm just glad there still ain't any `goto`s ;)*
But more seriously, the image is split into 4 parts because *it's just soooo long*
Press space to clear the lists before each run
And finally,
[Try it on~~line~~ Scratch!](https://scratch.mit.edu/projects/362536859/)
As SB Syntax:
```
when gf clicked
set[c v]to(0
ask()and wait
set[L v]to(length of(answer
add(1)to[b v
repeat((L)-(1
add(0)to[b v
end
repeat until<(c)=(1
set[s v]to(0
set[l v]to(1
repeat(length of[b v
change[s v]by(item(l)of[b v
change[l v]by(1
end
if<(s)=((L)*(L))>then
set[c v]to(1
end
set[r v]to(
set[l v]to(1
repeat(length of[b v
set[r v]to(join(r)(letter(item(i)of[b v])of(answer
change[i v]by(1
end
add(r)to[o v
replace item(1)of[b v]with((item(1)of[b v])+(1
set[j v]to(1
repeat(length of[b v
if<(item(j)of[b v])>(length of(answer))>then
replace item(j)of[b v]with(1
replace item((j)+(1))of[b v]with((item((j)+(1))of[b v])+(1
end
change[j v]by(1
```
*-5 bytes due to not being a silly billy and removing extranous spaces*
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~4~~ 3 bytes
*-1 byte thanks to a'\_'*
```
ā€ã
```
[Try it online!](https://tio.run/##yy9OTMpM/f//SOOjpjWHF///n5iU/B8A "05AB1E – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 2 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
ṗJ
```
A monadic Link which accepts a list of characters and returns a list of lists of lists of characters.
**[Try it online!](https://tio.run/##y0rNyan8///hzule/w@3u///r56YlKwOAA "Jelly – Try It Online")** (footer formats as a grid)
### How?
```
ṗJ - list, S
 J - range of length of S
ṗ  - Cartesian power (vectorises)
```
If we must output a flat list of "strings" (lists of characters) [we can add `Ẏ`](https://tio.run/##y0rNyan8///hzuleD3f1/T/c7v3/v3piUrI6AA "Jelly – Try It Online") (tighten) for the cost of a byte.
[Answer]
# [Haskell](https://www.haskell.org/), 34 bytes
```
f s=init$mapM(\_->s)=<<scanr(:)[]s
```
[Try it online!](https://tio.run/##BcHBDYAgDADAVRrCAx4sYMANnECNqY0oEQihzG@9e5DfK2eRCBxSTUMXbIvZDjezDd4zYe1msuvOUjBVCNB6qgM0RFB4kpKPYsabxVFrPw "Haskell – Try It Online")
Here's how it works, using input `s="abc"`:
```
                       scanr(:)[]s
```
Produces the suffixes of `s`, `["abc","bc","c",""]`, by prepending each character in turn to the front and tracking the intermediate results.
```
         mapM(\_->s)
```
Uses the list monad to map each element to `s`, that is, `'xy'-> ["abc","abc"]`, and take multiply them as a Cartesian product, here giving `["aa","ab","ac","ba","bb","bc","ca","cb","cc"]`.
```
         mapM(\_->s)=<<scanr(:)[]s
```
Uses `=<<` as `concatMap` to take the function above that uses `mapM` and apply it to each of the suffixes, thereby producing the Cartesian products of copies of `s` numbering from 0 to its length, in a single list.
```
    init$
```
Removes the empty string, produces from the suffix of length `0`.
```
f s=
```
Declares the function.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 6 bytes
```
gENIã)
```
[Try it online!](https://tio.run/##yy9OTMpM/f8/3dXP8/Bizf//E5OS/wMA "05AB1E – Try It Online")
# Explanation
```
gENIã)
 E     # foreach in...
g      # the input
    ã  # find the cartesian product of...
   I   # the input...
  N    # repeat N
     ) # wrap the final stack to an array
       # implicit output of the top element
```
[Answer]
# [J](http://jsoftware.com/), 16 bytes
```
a:-.~[:,#\{@#"{<
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/E6109eqirXSUY6odlJWqbf5rcqUmZ@QrpCmoJyYlq/8HAA "J – Try It Online")
* `a:-.~` Remove empty boxes from...
* `[:,` The flatten of...
* `{@#"{` The Catalog (cross prod) of `{@`...
* `#\{@#"{<`
	+ `<` The boxed input...
	+ `#"{` Copied this many times...
	+ `#\` 1, 2, ... N, where N is the input length. That is, we copy the input once, then twice, ... then N times, taking the Catalog of each of those.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 42 bytes
```
($a=$args)|%{($p=$p|%{$t=$_;$a|%{$t+$_}})}
```
[Try it online](https://tio.run/##HYxBCoQwEATv84pBWqPs/mAZ8CdhIuoeBEMUPMR5e9bspbr6UnG/5nR8520rWCSXHirQtB7D3eYeURAfwSnwH@hfX/BmgxUjchom92anFSGEOrW1O765zcSMxMIdY@HRP7dBasio/AA).
Expects input via [splatting](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_splatting).
[Answer]
# [PHP](https://php.net/), ~~176~~ ~~174~~ ~~173~~ ~~171~~ ~~170~~ 166 bytes
```
$c=$t=count($u=array_values(array_unique(str_split($argn))));for($s=1;$i<$t**$t;){$i-$c?:[$s++,$c*=$t,$i=0];for($k=$i++,$j=0;$j<$s;$j++,$k/=$t)echo$u[$k%$t];echo',';}
```
[Try it online!](https://tio.run/##JYxLCsIwAESv4mKk6Q/r1jR05yVKKSVUExuamI8g4tWNKZ3FwGMeY4SJbWeEOURwBs@4DqsnCGyydnqPr0mF2ZEdwiqfYSbO29EZJZM22fuap9CbtgSOnSlkC18U8DT/QNbg3aWHK8sKvEj/FSRrhl1fGOQ2PFhD8WjhUm@8nJKYz1xohB7LEX6gG2VVRr8xilkp/dPGS726WF// "PHP – Try It Online")
-4 bytes thanks to @Ismael Miguel.
Method: simply count in base N, where N is the number of unique characters in the input string.
[Answer]
# Python 3, 95 bytes
```
import itertools as i;lambda s:[''.join(p)for l in range(len(s))for p in i.product(s,repeat=l)]
```
[Try it online](https://tio.run/##rcwxDsIwDADAnVdYXepIqAsbqC9BDG6bgFFqW44ZeH0QvIH1hrN3PFROvfNu6gEc2UO1NqAGfKm0LxtBO1/HcXoqC1oq6lCBBZzknrFmwZZ@al/lyVy31xrYjp4tU8w13XqBGf62HcxZAgsOtKzbkFL/AA "Try it online!")
[Answer]
# [Python 2](https://docs.python.org/2/), ~~69~~ 68 bytes
```
f=lambda s,A={''}:s in A and A or f(s,A|{a+c for a in A for c in s})
```
[Try it online!](https://tio.run/##PY7NCsIwEITP@hQLHtLQUETBQ6GHPod42PxhqE1KEoRS@@wxqdLL7jc77DDTHJ/OXlLS3QtHLhEC67uFkLUNYCz0gFbm6TzoKlufBWsBOkv82QVFwbDSVMT2difIBWFAEHFbXEjyaI@HyRsbIezgfFSyytGUwaDmvUSb3SrU5EzY9UYpnCA6GHFQYCJwUBiM8uXmFcqt41t5o@emaf7Z6Qs "Python 2 – Try It Online")
Outputs a set; includes the empty string.
# [Python 2](https://docs.python.org/2/), 71 bytes
```
f=lambda s,A=[]:s in A and A or f(s,set(s)|{a+c for a in A for c in s})
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P802JzE3KSVRoVjH0TY61qpYITNPwVEhMS8FSOYXKaRpFOsUp5ZoFGvWVCdqJyukAcUSIWpAzGQQs7hW839BUWZeCVC1emJSsrrmfwA "Python 2 – Try It Online")
If empty string is not allowed...
[Answer]
# JavaScript (ES7), 90 bytes
Returns a Set.
```
s=>new Set([...Array(n=(L=-~s.length)**~-L)].map(_=>(g=n=>n?[s[n%L-1]]+g(n/L|0):'')(n--)))
```
[Try it online!](https://tio.run/##ZcsxCwIhFADgvV/REr53odUaeNHu1igSZp4V9jxUiiDur9vtrR98D/uyxeX7WDmlq2@DbEX25N/Lk6@ghRDHnO0HSIKSfCoiegr1hl03cYVGPO0IZ9lDkDS3gy6aVorvjFkHoI36bnHPGAJxjojNJSopehFTgAGYvTDExR@6WdsP "JavaScript (Node.js) – Try It Online")
### Commented
```
s => new Set(            // build a set from
  [...Array(             //   an array of
    n =                  //   n entries, with:
      (L = -~s.length)   //     n = L ** (L - 1)
      ** ~-L             //     where L is the length of s + 1
  )]                     //   
  .map(_ =>              //   for each entry:
    ( g = n =>           //     g is a recursive function taking n
        n ?              //       if n is not equal to 0:
          [s[n % L - 1]] //         output s[(n mod L) - 1]
                         //         or an empty string if it's undefined
          + g(n / L | 0) //         recursive call with floor(n / L)
        :                //       else:
          ''             //         stop recursion
    )(n--)               //     initial call to g; decrement n afterwards
  )                      //   end of map()
)                        // end of Set()
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 17 bytes
```
ＦＥθＸＬθ⊕κＥι✂⍘⁺ικθ¹
```
[Try it online!](https://tio.run/##HcuxDsIwDATQX/HoSmHozMZWCaRI/QJjTBs1JK2bwuebpDfe3eOZlDNFs3dWwAetuDnw@SeKd0lTmXHrHAyJVT6Sirxw6WrAa0jl/AcHYwwseKNdxlL7CX089jYs1TbfV3I1oyfb5Rv/ "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
ＦＥθＸＬθ⊕κ
```
Loop over the substring lengths and raise the length to each power in turn.
```
Ｅι✂⍘⁺ικθ¹
```
Loop from each power to double its value and perform base conversion using the input string as the alphabet, then slice off the first character.
[Answer]
# [Husk](https://github.com/barbuz/Husk), 4 bytes
Total Husk novice, there may be better ways to golf this.
```
Mπŀ¹
```
[Try it online!](https://tio.run/##yygtzv7/3/d8w9GGQzv///@vlJiUrAQA "Husk – Try It Online")
# Explanation
```
  ŀ¹ Find the range [1, ..., len(input)]
Mπ   Map with cartesian power of input
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 60 bytes
```
->s{a,*z=s.chars,'';z.product(*a.map{a+z}).map(&:join)-z|[]}
```
[Try it online!](https://tio.run/##HYtLDkAwGAavYuX3qB6AcJHG4mtFkKBpSag6ez1WM4sZs8sz9HUoGnuBZa62XA0wlhFVjmuzdrvakgx8hr6Quzv9LInLaR2XtHBetHcQBKmIRQTgh1Qdtf/iD6@jXhxv9QA "Ruby – Try It Online")
[Answer]
# [Burlesque](https://github.com/FMNSSun/Burlesque), ~~5~~ 4 bytes
```
sacb
```
[Try it online!](https://tio.run/##SyotykktLixN/f@/ODE56f//xKRkAA "Burlesque – Try It Online")
-1 thanks to DeathIncarnate!
```
sa    # Duplicate the input and get it's length
  cb  # Get all combinations of the input characters up to the length of the input
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 32 bytes
```
{flat [\X~] '',|[xx] .comb xx 2}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/Oi0nsUQhOiaiLlZBXV2nJrqiIlZBLzk/N0mhokLBqPa/NVdxYqVCmoJ6YlKyOoKjbv0fAA "Perl 6 – Try It Online")
Anonymous code block that takes a string and returns a list of string including the length zero permutation.
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 5 bytes
```
^LQSl
```
[Try it here!](https://pythtemp.herokuapp.com/?code=%5ELQSl&input=%22abc%22&debug=0)
[Answer]
# [R](https://www.r-project.org/), 112 bytes
```
function(S,s=sapply)cat(unlist(s(1:nchar(S),function(X)do.call('paste0',expand.grid(s(rep(S,X),strsplit,''))))))
```
[Try it online!](https://tio.run/##ZY09CsMwDIX3XEQSmNCuhQw9Q5YMXVTbaQ1GEZYD7eldp0OXvunx8X5KW6e27uJr2gRnZ5Oxan6T54q75GQVDc8X8U8uOJP7ZRcK2@g5ZwRlq/EELr6UJYyPkkIvlah9cCFntZjmVB0AfdVWBL4CDccJ3KS74UD/5O6B2gc "R – Try It Online")
Things that make you go Argh, strings in R.
Expands out to the following
```
cat(                                           # output the results
  unlist(                                      # collapse the list
    sapply(1:nchar(S),                         # for 1 to character length of S
      function(X)do.call('paste0',             # for each row from the grid paste characters together
         expand.grid(                          # create permutations 
           sapply(rep(S,X),strsplit,''))))))   # replicate the string X times and split.
```
So we produce a lists of `[['a','b','c']]`, `[['a','b','c'],['a','b','c']]`, `[['a','b','c'],['a','b','c'],['a','b','c']]`.
These are feed into `expand.grid` to produce the permutations. 
Each row of the grid is pasted together with no gaps in the `do.call`.
As it is still in a list we apply `unlist` so that cat will be able to output it.
[Answer]
# [Perl 5](https://www.perl.org/) `-lF`, 48 bytes
```
$"=',';map$k{$_}++||say,glob"{@F}"."{@F,''}"x$#F
```
[Try it online!](https://tio.run/##K0gtyjH9/19FyVZdR906N7FAJbtaJb5WW7umpjixUic9Jz9JqdrBrVZJD0TpqKvXKlWoKLv9/5@YlPwvv6AkMz@v@L@ur6megaHBf90cNwA "Perl 5 – Try It Online")
]