jackpot@lemmy.ml to Programming@programming.dev · 11 months agowhen is it best to use a recursive function vs a for loopmessage-squaremessage-square53fedilinkarrow-up138arrow-down13
arrow-up135arrow-down1message-squarewhen is it best to use a recursive function vs a for loopjackpot@lemmy.ml to Programming@programming.dev · 11 months agomessage-square53fedilink
minus-squarecvttsd2si@programming.devlinkfedilinkarrow-up6·edit-211 months agoWhen doing functional programming, you can’t really do loops (because of referential transparency, you can’t update iterators or indices). However, recursion still works.
When doing functional programming, you can’t really do loops (because of referential transparency, you can’t update iterators or indices). However, recursion still works.