jackpot@lemmy.mlBanned to Programming@programming.dev · 2 years agowhen is it best to use a recursive function vs a for loopmessage-squaremessage-square50linkfedilinkarrow-up134arrow-down13
arrow-up131arrow-down1message-squarewhen is it best to use a recursive function vs a for loopjackpot@lemmy.mlBanned to Programming@programming.dev · 2 years agomessage-square50linkfedilink
minus-squarecvttsd2si@programming.devlinkfedilinkarrow-up6·edit-22 years 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.