@Adnan One more suggested change, make the Exit command (q) an actual exit regardless of anything else. Currently when using q inside a map (ε) for example, it's just being ignored and the mapping continues.
@everyone The rewrite of 05AB1E is now available on TIO. This is kinda like the beta test in order to identify as many bugs as possible. Please let me know if you have found a bug.
2
If it doesn't work as expected, you can always fall back to the legacy version of 05AB1E. This uses the latest updated version of the Python interpreter.
I see why it didn't work in my previous 6-byter: I had input, so a(0) wasn't 1 anymore. I really tried that
Thanks!
@Adnan Nice. That produces no output though, right?
erl_child_setup closed
Crash dump is being written to: erl_crash.dump.../srv/wrappers/osabie: line 3: 12978 Killed /opt/osabie/osabie .code.tio "$@" < .input.tio
The reverse-then-add (RTA) sequence is a sequence obtained by adding a number to its reverse, and repeating the process on the result. For eg.,
$$ 5 + 5 = 10 \Rightarrow 10 + 01 = 11 \Rightarrow 11 + 11 = 22 \Rightarrow 22 + 22 = 44 \Rightarrow\text{ }... $$
Thus, 5's RTA sequence contains 10...
Oh, forgot to mention: Thank you for putting so much time and effort into this wonderful golfing language once again! You've just given us a nice gift, which we'll use to squish those byte with great pleasure
My pleasure! It's kinda weird how fast the time goes, because I currently have worked on this for about a month, which I did not expect to take so long
05AB1E, 7 bytes
Using the new version of 05AB1E (rewritten in Elixir).
Code
L.ΔλjÂ+
Try it online!
Explanation
L # Create the list [1, ..., input]
.Δ # Iterate over each value and return the first value that returns a truthy value for:
λ # Where the base case...