nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 2 years agoI wishi.imgur.comimagemessage-square185linkfedilinkarrow-up1919arrow-down117
arrow-up1902arrow-down1imageI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 2 years agomessage-square185linkfedilink
minus-squaremellejwz@lemmy.worldlinkfedilinkEnglisharrow-up2·2 years agoMy bad, I looked over the returns. If you return something there wouldn’t be much difference between both.
minus-squareCosmicomical@lemmy.worldlinkfedilinkarrow-up1·2 years agoOk just to clarify this was a joke. It was just a pedantic improvement on a deranged solution. The only sensible way to do this is with % 2 or with bitwise operations imo.
minus-squareValmond@lemmy.mindoki.comlinkfedilinkarrow-up1·2 years agoYeah gotta store the return value in a variable!
Each clause already returns
My bad, I looked over the returns. If you return something there wouldn’t be much difference between both.
Ok just to clarify this was a joke. It was just a pedantic improvement on a deranged solution. The only sensible way to do this is with % 2 or with bitwise operations imo.
Yeah gotta store the return value in a variable!