Comment on I wish
Skyline969@lemmy.ca 1 year ago
Wow. Amateur hour over here. There’s a much easier way to write this.
A case select:
select(number){ case 1: return false; break; case 2: return true; break; }
And so on.
Comment on I wish
Skyline969@lemmy.ca 1 year ago
Wow. Amateur hour over here. There’s a much easier way to write this.
A case select:
select(number){ case 1: return false; break; case 2: return true; break; }
And so on.
robotica@lemmy.world 1 year ago
Don’t forget that you can have fall-through cases, so you can simplify it even further:
UNWILLING_PARTICIPANT@sh.itjust.works 1 year ago
Teach me