cm0002@lemmy.world to Programmer Humor · 15 days agoRecursionkbin.melroy.orgimagemessage-square16linkfedilinkarrow-up1395arrow-down17
arrow-up1388arrow-down1imageRecursionkbin.melroy.orgcm0002@lemmy.world to Programmer Humor · 15 days agomessage-square16linkfedilink
minus-squareReptorianlinkfedilinkarrow-up3·15 days agoI had this problem only once. Luckily, I do not need recursion. I know my way using iterative process.
minus-squareReptorianlinkfedilinkarrow-up2·13 days agoI actually use repeat(iterations,index_name(optionall),);. No need for i++ or ++i for loop in many cases.
minus-squareReptorianlinkfedilinkarrow-up2·8 days agoYeah. repeat() is unique to a few language. I think just Scala, and G’MIC has it. I use the second one. It’s more convenient than say for(p=0,p<5,++p,);. Sometimes, repeat(5,); suffice.
I had this problem only once. Luckily, I do not need recursion. I know my way using iterative process.
You forgot
i++
I actually use
repeat(iterations,index_name(optionall),);
. No need for i++ or ++i for loop in many cases.😶
Yeah. repeat() is unique to a few language. I think just Scala, and G’MIC has it. I use the second one. It’s more convenient than say
for(p=0,p<5,++p,);
. Sometimes,repeat(5,);
suffice.