Skip to main content
Arnauld Golf
Source Link
ATaco
  • 11.2k
  • 28
  • 78

JavaScript (V8), 5757 52 bytes

-5 bytes thanks to @Arnauld

There was a shorter way

s=>`()=>"\\$s=>`_=>"\\${s.charCodeAt(0).toString(8)}${s+s.substrslice(1)}"`

The smallest representable Octal letter is A at 101, which means we don't actually need to pad this.

Try it online!Try it online!

JavaScript (V8), 57 bytes

There was a shorter way

s=>`()=>"\\${s.charCodeAt(0).toString(8)}${s.substr(1)}"`

The smallest representable Octal letter is A at 101, which means we don't actually need to pad this.

Try it online!

JavaScript (V8), 57 52 bytes

-5 bytes thanks to @Arnauld

There was a shorter way

s=>`_=>"\\${s.charCodeAt().toString(8)+s.slice(1)}"`

The smallest representable Octal letter is A at 101, which means we don't actually need to pad this.

Try it online!

Source Link
ATaco
  • 11.2k
  • 28
  • 78

JavaScript (V8), 57 bytes

There was a shorter way

s=>`()=>"\\${s.charCodeAt(0).toString(8)}${s.substr(1)}"`

The smallest representable Octal letter is A at 101, which means we don't actually need to pad this.

Try it online!