News for hackers. Stuff that matters.
Re:How not to teach recursion (2021) by Someone on Saturday June 18, 2022 @06:12PM (#31794271)
A simpler way multiplication is recursive is the way it is defined for natural numbers in mathematics:

  a × b = 0                if b = 0
  a × b = a + a × (b - 1)  if b ≠ 0
Re:How not to teach recursion (2021) by nonsapreiche on Saturday June 18, 2022 @09:12PM (#31795272)
a x b = a if b = 1
Re:How not to teach recursion (2021) by ethanwillis on Sunday June 19, 2022 @12:25AM (#31796158)
What is a + a x 0? :)