|
# Takes strict range 0..<n and generates n! permutations
|
|
# (from https://github.com/Omnikar/uiua-math/blob/main/lib.ua).
|
|
Perms ← ☇1⍉∧(≡↻⇡⟜↯+1⟜⊂):¤¤°⊂
|
|
|
|
Permute ← ≡⊏⊙¤⊸(Perms⇡⧻) # Generalised helper function.
|
|
⟜⧻Permute {"this" "is" "fine"} # Yoda simulator
|