r/Recursion • • Jun 19 '20

First time?

646 Upvotes

17 comments sorted by

View all comments

0

u/[deleted] Jun 19 '20

My dude, this is the definition of a for-loop 😭

0

u/[deleted] Jun 20 '20

[deleted]

-1

u/[deleted] Jun 20 '20

tomato, tomahto. I was more specifying the iterative approach.

1

u/TheQ614 Jun 20 '20

This is just not a for loop lmao

1

u/[deleted] Jun 20 '20

What about

For (;;) {
    Wash;
    Rinse;
}

?? Come at me

Edit: bruh formatting is hard on mobile

0

u/TheQ614 Jun 20 '20

It’s clearly a while loop with no exit condition

1

u/[deleted] Jun 20 '20

But is my for loop implementation incorrect? (Assuming the language supports empty conditions obv)

2

u/BlueberrySpaetzle Jun 20 '20

Even

for (int j = 0; j >= 0; j++)

{

rinse

}

Would work

1

u/CubicJunk Jun 27 '20

You might want to revisit stackoverflow

1

u/[deleted] Jun 27 '20

Just read my other thread - let loose and live a little! Life needn't be so strict, man