Skip to main content
3 of 3
added 89 characters in body
Aaroneous Miller
  • 9.9k
  • 1
  • 26
  • 40

Red, 38 26 37 bytes

Thanks to @9214 for telling me about the loop command for -12 bytes.

+11 bytes to fix invalidities brought out by @Bubbler.

func[a b][x: a loop b - 1[x: a ** x]] 

Try it online!

Aaroneous Miller
  • 9.9k
  • 1
  • 26
  • 40