MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Recursion/comments/10046gf/its_called_repetition_sweaty/
r/Recursion • u/namebrandcloth • Dec 31 '22
10 comments sorted by
9
No, something like
f(x) = 0 if x=0
f(x) = f(x-1)+1 if x>0
f(x) = f(x+1)-1 if x<0
Is recursive, f(x) needs to be defined in terms of f(g(x)) for it to be recursive. (In my example g(x) = x-1 if x>0 and g(x) =x+1 if x<0)
6 u/namebrandcloth Jan 01 '23 the joke is that people are posting repetition
6
the joke is that people are posting repetition
21
I'm not sweaty you're sweaty
8
It's a high order function /s
5
with the replies it seems the sweaty bit is falling into obscurity, i am devastated
3
int main() { main(); }
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
4
It's cold outside, i ain't sweating.
2
Ok sweety
1
Sure sweetie
0
I'm quite sweaty to be honest
9
u/janhetjoch Jan 01 '23
No, something like
f(x) = 0 if x=0
f(x) = f(x-1)+1 if x>0
f(x) = f(x+1)-1 if x<0
Is recursive, f(x) needs to be defined in terms of f(g(x)) for it to be recursive. (In my example g(x) = x-1 if x>0 and g(x) =x+1 if x<0)
21
u/imbakinacake Dec 31 '22
I'm not sweaty you're sweaty
8
u/[deleted] Dec 31 '22
It's a high order function /s
5
u/Meefbo Jan 01 '23
with the replies it seems the sweaty bit is falling into obscurity, i am devastated
3
u/AutoModerator Dec 31 '22
int main() { main(); }
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
4
u/hotel2oscar Jan 01 '23
It's cold outside, i ain't sweating.
2
u/MANNYKINGS Jan 01 '23
Ok sweety
1
u/[deleted] Jan 01 '23
Sure sweetie
0
u/funnyTheo Jan 01 '23
I'm quite sweaty to be honest