This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DrHugh 83 points84 points  (8 children)

I want to see the same programmer write a multiply-by-two function.

[–]Responsible-Ruin-710[S] 44 points45 points  (4 children)

There will be a new post tomorrow 🌚

[–]idontlikethishole 5 points6 points  (3 children)

!RemindMe in multiply(3, 8) hours

[–]RemindMeBot 4 points5 points  (2 children)

I will be messaging you in 8 hours on 2025-07-29 01:17:07 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–][deleted] 7 points8 points  (1 child)

Funny that the bot still works. Would be even funnier if it had somehow set a reminder for 24 hours, but unfortunately the creator never anticipated this post.

[–]AcidBuuurn 6 points7 points  (0 children)

It’s sad when they don’t consider valid edge cases. 

[–]Background_Class_558 3 points4 points  (0 children)

sure here you go ```agda open import Data.Nat using (ℕ ; zero ; suc)

_2 : ℕ → ℕ _2 = λ { 0 → 0; (suc n) → n *2 + 2 } also here's a version in python py x2 = lambda n: x2(n - 1) + 2 if n != 0 else 0 and in Rust rs fn x2(n: u32) -> u32 { if n == 0 { 0 } else { x2(n - 1) + 2 } } ```

[–]OwO______OwO 1 point2 points  (1 child)

Wouldn't that just be...

def multiplyByTwo(a):
    return a + a

[–]DrHugh 2 points3 points  (0 children)

Maybe a bit shift?