@jackpot@lemmy.ml to Programming@programming.dev • 1 year agowhen is it best to use a recursive function vs a for loopmessage-square52fedilinkarrow-up133
arrow-up133message-squarewhen is it best to use a recursive function vs a for loop@jackpot@lemmy.ml to Programming@programming.dev • 1 year agomessage-square52fedilink
minus-square@cvttsd2si@programming.devlinkfedilink6•edit-21 year 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.