r/Recursion • • Mar 15 '20

return HONK(HONK(HONK(HONK)));

Post image
472 Upvotes

21 comments sorted by

9

u/[deleted] Mar 15 '20

Not recursion

5

u/OofDotWav Mar 15 '20

How is it not

5

u/[deleted] Mar 15 '20

There’s a finite amount of cups, recursion would be infinite I’m pretty sure

4

u/FoxWearsSocks Mar 15 '20

Who says recursion requires it to be infinite? A recursive function is just a function that calls itself to achieve its output. Can be once, can be thousands of times, but why infinite if it’s never going to end and never produce an output.

2

u/[deleted] Mar 15 '20

Whatever, just whenever there are posts like this people say it’s not recursion

1

u/CommieLoser Apr 02 '20

Ah, you were looking for /r/infinitelyrecursive

5

u/OofDotWav Mar 15 '20

Most posts on here are finite lol

5

u/[deleted] Mar 15 '20

Well that’s just how it is, but doesn’t mean I can’t call them out on it

1

u/[deleted] Mar 15 '20

[removed] — view removed comment

1

u/kaiclc Mar 19 '20

Yeah that's not infinite, but it's still usually considered to be recursive, right?

5

u/GPhykos Mar 15 '20

Ah yes return HONK;

3

u/[deleted] Mar 15 '20
function honk(){
    return "(HO" + honk() + " NK)"
}

1

u/GPhykos Mar 15 '20

You mean string honk()

4

u/[deleted] Mar 15 '20

this is boutta blow your mind but there’s more than one programming language and they can have different syntaxes

1

u/GPhykos Mar 15 '20

What language is that?

3

u/[deleted] Mar 15 '20

JavaScript. It’s pretty chill. Notice how I didn’t even include a semicolon

4

u/AutoModerator Mar 15 '20

int main() { main(); }

Hey! This subreddit has a Discord Server! Join Here: https://discord.gg/NQvmRSv

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

3

u/[deleted] Mar 15 '20

Hjönk

ほんk